[Cuis-dev] cascade and youself

Juan Vuletich JuanVuletich at zoho.com
Thu Jan 27 09:56:02 PST 2022


On 1/27/2022 7:17 AM, Hilaire Fernandes via Cuis-dev wrote:
>
> Hi,
>
> Exploring...
>
> This code below does not work (#openInWorld send to the array of 
> buttons) but you get the idea of the intend.
>
> How will you make it work, if possible,  without using a local 
> variable of course ?
> |RadioGroup>>example1|
> |"|
> |	self example1 openInWorld|
> |"|
> |	^ self fromList: #('Yes' 'No') ::|
> |		buttons do: [:each ||
> |			each when: #radioSelection send: #show: to: Transcript];|
> |		yourself|
>
>
> Thanks
>
> Hilaire
>
> -- 
> GNU Dr. Geo
> http://drgeo.eu
> http://blog.drgeo.eu

This seems to work, only requiring #buttonsDo:

RadioGroup >> example1
"
     self example1 openInWorld
"
     ^ self fromList: #('Yes' 'No') ::
         buttonsDo: [:each |
             each when: #radioSelection send: #show: to: Transcript];
         yourself

Cheers,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
https://independent.academia.edu/JuanVuletich
https://www.researchgate.net/profile/Juan-Vuletich
https://patents.justia.com/inventor/juan-manuel-vuletich
@JuanVuletich

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220127/d3cba26d/attachment.htm>


More information about the Cuis-dev mailing list