[Pharo-project] default selection of senders

Stéphane Ducasse stephane.ducasse at inria.fr
Fri Nov 28 08:04:41 CET 2008


>> objectViewed
>>       "Answer the morph associated with the player that the  
>> structure the
>> receiver currently finds itself within represents."
>>
>>       ^ (self outermostMorphThat: [:o | o isKindOf: Viewer orOf:
>> ScriptEditorMorph]) objectViewed
>>
>
> Uh-oh
> #isKindOf:orOf:
>
> poor me, didn't knew that using isKindOf: is evil. Now i'll use it  
> anywhere!
> Its fantastic method! I think we should also have #isKindOf:orOf:orOf:
> as well :)


even better
isKindOfCollection:

and well may be we could also test the instance variable names of the  
class in addition

:)

Stef





More information about the Pharo-project mailing list