Fun with Morphic, trouble with lines..

Ned Konz ned at bike-nomad.com
Mon Feb 17 16:46:27 UTC 2003


On Sunday 16 February 2003 10:18 pm, Chris Muller wrote:
> One thing I'm curious about..  What is the best way to connect two
> Morphs with a line?  I tried creating a subclass of LineMorph to
> hold two variables (originatingMorph and terminatingMorph).  In its
> drawOn: I set the vertices to the centers of those two morphs and
> then called super drawOn: to draw normally.
>
> It draws when I initially open in the world, but never again after
> I move the two endpoint morphs..

You have to use a step method to make the line ends track. However, 
I've already done all of this in Connectors.

> I think I'm approaching this the wrong way.  How do you do it?

I use Connectors.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list