[Cuis-dev] cascade and youself
Mark Janssen
cuis at mpcjanssen.nl
Mon Jan 31 02:13:54 PST 2022
On Mon, Jan 31, 2022, at 10:54 AM, Mark Janssen via Cuis-dev wrote:
>
>
> On Thu, Jan 27, 2022, at 6:58 PM, Hilaire Fernandes via Cuis-dev wrote:
>> Yes, I know this solution or the use of a temporary variable. This is not what I had in mind.
>>
>> Le 27/01/2022 à 18:56, Juan Vuletich a écrit :
>>> This seems to work, only requiring #buttonsDo:
>> --
>> 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
>
> I can't test this exactly, but I think this should work:
>
> `self yourself ;
> fromList: #('Yes' 'No') ::`
> ` buttons do: [:each | `
> ` each when: #radioSelection send: #show: to: Transcript];`
> `yourself`
>
> Mark
>
>
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
Hmm, self yourself; is just a very longhand for self :)
It looks what you need is something like also in Kotlin (https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/also.html) which has the specific use case to initialize some object and return the object itself
Then this could be written as:
> `self also: [ :rg |
> rg fromList: #('Yes' 'No') ::`
> ` buttons do: [:each | `
> ` each when: #radioSelection send: #show: to: Transcript]]`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20220131/e718bc68/attachment.htm>
More information about the Cuis-dev
mailing list