Feedback on connector morphs
Ned Konz
ned at bike-nomad.com
Mon Apr 22 23:06:50 UTC 2002
On Sunday 21 April 2002 01:03 pm, stephane ducasse (home) wrote:
> Hi ned,
>
> To resolve my problem for duplicating a group of morph and
> connectors I embedded them in a rectangle. I took my previous
> connected item and one by one embedded them into a rectangle
> surrounding them.
> This worked perfectly until the point I wanted to add a new
> connector between two morphs *already* embedded in the rectangle.
> Then the connector got crazy and I could not figure out how to
> place the red square so that the generalization points on one of my
> uml box. This was crazy to the point that I de-embedded all the
> morph from the rectangle and destroy the rectangle.
If you want to embed morphs and still use the connectors on them,
either:
* embed them in a PasteUpMorph, or
* use something that includes a PasteUpMorph, like one of my
CompositeState or ScrolledCompositeState morphs. You can delete the
tabs, change the color, etc., or
* make a new subclass of NCConnectorMorph that understands how to find
targets differently. Right now the decision of what we can connect to
is in
NCConnectorMorph>>connectionTargetsAt: localPoint for: constraint
in which we look for a root morph in the innermost enclosing
pasteupmorph. Or,
* make sure that your container returns false from
wantsAttachmentFromEnd: endIndex ofConnector: aConnector at: aPoint
BookMorphs, for instance, don't want to be connected to, and can be
used as containers without worrying about connectors connecting to
them.
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|