[Pharo-project] [Fwd: Re: [squeak-dev] Re: The Trunk: Morphic-ar.305.mcz]
This is cool. we should add it to pharo. http://code.google.com/p/pharo/issues/detail?id=1787 I don't know if tag it for 1.0, even thought only for having it and that new code created on 1.0 use the new is: message instead of a isXXX message. For now is only for 1.1 Cheers -- Miguel Cobá http://miguel.leugim.com.mx
for 1.1 only critical fixes should go in 1.0 and 1.0 should get out of the door :)
The real solution here is to send 'is: #ScriptEditorMorph' and implement
Object >> is: aSymbol "A means for cleanly replacing all isXXX like methods. Please use judiciously! Suggested by Igor Stasenko at http://lists.squeakfoundation.org/pipermail/squeak-dev/2009-June/136793.html"
^false
ScriptEditorMorph >> is: aSymbol ^ aSymbol = #ScriptEditorMorph or: [ super is: aSymbol ]
In this way you easily get rid of all #isXXX methods (at least, all that just answer the true or false constants). Much more interesting: when you unload EToys there is no knowledge about ScriptEditorMorph in unrelated classes (such as Morph or Object).
we do not have etoy related is: methods.... or we can remove it just straight Now I somehow like the idea. Stef
El mar, 12-01-2010 a las 21:18 +0100, Stéphane Ducasse escribió:
for 1.1
only critical fixes should go in 1.0 and 1.0 should get out of the door :)
Ok
The real solution here is to send 'is: #ScriptEditorMorph' and implement
Object >> is: aSymbol "A means for cleanly replacing all isXXX like methods. Please use judiciously! Suggested by Igor Stasenko at http://lists.squeakfoundation.org/pipermail/squeak-dev/2009-June/136793.html"
^false
ScriptEditorMorph >> is: aSymbol ^ aSymbol = #ScriptEditorMorph or: [ super is: aSymbol ]
In this way you easily get rid of all #isXXX methods (at least, all that just answer the true or false constants). Much more interesting: when you unload EToys there is no knowledge about ScriptEditorMorph in unrelated classes (such as Morph or Object).
we do not have etoy related is: methods.... or we can remove it just straight Now I somehow like the idea.
Yes, is only to have a neutral way to test for equality with some given class, be this etoys, seaside or whatever someone want to test an object against. In fact the method does nothing by itself nor changes the image in a given way. It is required that all the code that has methods isXXX is changed to use the new way to test class membership. But 1.1 is ok with me. Cheers
Stef _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Miguel Cobá http://miguel.leugim.com.mx
participants (2)
-
Miguel Enrique Cobá Martinez -
Stéphane Ducasse