[Cuis-dev] cascade and youself

Luciano Notarfrancesco luchiano at gmail.com
Mon Jan 31 02:54:38 PST 2022


Yes, I sometimes use ifNotNil: just like that, instead of declaring a
method temp var the temp is the block argument.


On Mon, 31 Jan 2022 at 5:14 PM Mark Janssen via Cuis-dev <
cuis-dev at lists.cuis.st> wrote:

>
>
> 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. Geohttp://drgeo.euhttp://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]]
>
>
> --
> 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/20220131/a3eadf87/attachment.htm>


More information about the Cuis-dev mailing list