Am 31.08.2005 um 22:01 schrieb Matej Košík:
Mariano Wahlmann wrote:
Hi, my name is Mariano Wahlmann, i'm using Squeak3.8 and I have a questions about LineMorph class: Why exists the new method as class method instead of having an initialize method?. I ask this because if you want to extend this class, you have to re-write new and initialize methods. Is this maybe a bug?. Thanks
I think, it is a bug. The LineMorph class from:to:color:width: should not refer directly to `PolygonMorph'. It disables the attempts to make subclasses of LineMorph.
I recommend you to use PolygonMorph directly (subclass it if you need). Under certain conditions, you could also use polygon-morph (or line-morph) instances directly, set up their properties and make them part of larger structures. Morphic has great (other may have different opinion) mechanisms for composing things. One only has to learn them. As comrade Lenin said, browse-browse-browse. :)
This mail enlightens why LineMorph is implemented this way...
http://lists.squeakfoundation.org/pipermail/squeak-dev/2003-March/ 054537.html
for me, it is clearly a questioable design and should be fixed. But the authors disagree.
Marcus