[squeak-dev] Re: The Trunk: Morphic-ar.305.mcz

Andreas Raab andreas.raab at gmx.de
Tue Jan 12 07:12:47 UTC 2010


Levente Uzonyi wrote:
> On Mon, 11 Jan 2010, Andreas Raab wrote:
>> Neither. For one thing, this method already says isScriptEditorMORPH 
>> so it obviously implies isMorph == true. (this would be different if 
>> it were isScriptEditor because there might be non-morph script editors).
> 
> In this case all is*Morph methods should be moved to Object from Morph.

Let's not split hairs here. Obviously such tests should be declared on 
the smallest reasonable scope. I'll remind you that I promoted that 
method only because it was actually sent to non-morphs. But at that 
point it's just silly to write, e.g., (obj isMorph and:[obj isBarMorph 
and:[obj isFooBarMorph]]) instead of obj isFooBarMorph.

>> And it clearly can't be moved to the Etoys package - the whole purpose 
>> of the method is to make it possibly to unload Etoys and get 
>> isScriptEditorMorph == false for all other objects. This would blow up 
>> straight into your face if you'd move it to Etoys. Same goes for 
>> MorphExtension>>actorState, MorphExtension>>player etc. They all need 
>> to stay in the original packages since after unloading Etoys these 
>> messages will still be sent; they will just never return true / 
>> non-nil respectively.
> 
> Of course moving it to EToys would require refactoring of the code.

Knock yourself out. I think there's far bigger fish to fry with regards 
to unloading code but if that's what you'd like to work on be my guest.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list