[FIX] creation of a LineMorph ([sm] [cd] doubts about this)

diegogomezdeck at consultar.com diegogomezdeck at consultar.com
Sun Mar 9 11:11:52 UTC 2003


Let's remove LineMorph and let's replace it by another entry in "Objects"
chooser.

Cheers,

Diego Gomez Deck

> On Saturday 08 March 2003 02:25 pm, Scott Wallace wrote:
>> Before jumping into adopting this "fix", please look at the class
>> comment of LineMorph.
>>
>> If I understand Dan's intentions correctly, LineMorph (which adds no
>> instance variables and has no instance-side methods) is never intended
>> to be instantiated; all instantiation calls to LineMorph are
>> *expected* to result in instances of vanilla PolygonMorph.
>>
>> Thus, Dan's use of the hard-coded "PolygonMorph" in LineMorph
>> class-side method #from:to:color:width: was decidedly intentional, and
>> the proposed "easy to understand fix" violates that intention.
>
> I agree. LineMorph is just a short-cut to construct 2-vertex
> PolygonMorphs. I think the reason for LineMorph dates back to when  the
> NewMorph catalog was class-based and you couldn't have more than  one
> variant. So when you got a PolygonMorph, it was a closed curve,  and
> when you got a LineMorph, you had a PolygonMorph but it was an  open
> 2-vertex PM.
>
> --
> Ned Konz
> http://bike-nomad.com
> GPG key ID: BEEA7EFE





More information about the Squeak-dev mailing list