[squeak-dev] Resume Problems

Stéphane Rollandin lecteur at zogotounga.net
Fri Dec 19 10:56:56 UTC 2008


> SoupTag>>find: aBlock
> 
>      ^ children detect: [:anElement | (anElement find: aBlock) notNil]
>     ifNone: [
>       [(aBlock value: self) ifTrue: [self]]
>              on: MessageNotUnderstood
>               do: [nil]].
> 

I just realized this code is wrong, since it can only return a direct 
children, not a grandchildren (if your children have children themselves..)

Stef




More information about the Squeak-dev mailing list