[Cuis-dev] cascade and youself

Luciano Notarfrancesco luchiano at gmail.com
Thu Jan 27 04:17:24 PST 2022


Actually #yourself is sent to the object returned by #buttons, which is
also the receiver of #do:. The simplest solution I see if using a temporary
variable. If RadioGrouo implemented #buttonsDo: you could solve it using
that message, but adding that method is more complicated than using a temp,
imo.

On Thu, 27 Jan 2022 at 6:59 PM Mariano Montone via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

> El 27/1/22 a las 07:17, Hilaire Fernandes via Cuis-dev escribió:
> > 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 ?
>
> I think you can't? The receiver object is the result of (self fromList:
> #('Yes' 'No')), and so #yourself is sent to that object.
>
> There may be some trick to avoid a variable here, but I'm not aware of it.
>
> Cheers,
>
> Mariano
>
> >
> > |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
> >
> >
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220127/2f18070d/attachment.htm>


More information about the Cuis-dev mailing list