[squeak-dev] Re: isKindOf: in Morphic code...

karl ramberg karlramberg at gmail.com
Tue Jul 5 13:17:24 UTC 2016


A lot of the isKindOf: sends is used to find specific submorphs.

ButtonMorph>>label
| s |
s := ''.
self allMorphsDo: [:m | (m isKindOf: StringMorph) ifTrue: [s := m
contents]].
^ s

One could give names to the submorphs as they are initialized, all morphs
understand 'name:'

Would that be a solution ?

Best,
Karl




On Tue, Jul 5, 2016 at 1:52 PM, Stéphane Rollandin <lecteur at zogotounga.net>
wrote:

> Calling this phenomenon a "bug" does not feel right. It feels like a blame
>> on some particular developers. I don't think it is.
>>
>
> +1
>
> Stef
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20160705/9acfc386/attachment.htm


More information about the Squeak-dev mailing list