hptylim at dc.uba.ar
Wed Feb 26 21:53:01 UTC 2003
> > I'm having problems with the following scenario in Connectors.
> > I have a PasteUpMorph and a couple of connected morphs with an
> > NCConnectorMorph.
> I'm not sure I understand:
> * I assume your PUM is transformed, or this wouldn't be an issue.
> * Are the connected morphs on the PUM or in the World, or what?
The connected morphs are on the PUM, The PUM is on a
> > When I disconnected one of the connector's ends and that end was
> > following the hand, I noticed that the connector's owner changed to
> > the world and it's bounds were transformed to the world's
> > coordinate system. So far so good.
> > The problem began when I dropped the dragged end over the
> > pasteUpMorph.
> But didn't connect it to anything, right?
> > The connector's owner changed to the pasteUpMorph but
> > the coordinate systems on the connector's end were swapped. The
> > connected end was using the pasteUpMorph coordinate system but the
> > disconnected one was using the world coordinate system.
> > Is this the expected behavior?
> No. What did that make it look like? What you should get is that the
> Connector is owned by the World, and the bounds of both the ends are
> in the coordinate system of their connector.
> I can't get the behavior you describe. Can you describe what you did
> in more detail?
Please, try evaluating this:
(I did it on a Squeak3.4gamma-5168 image with Connectors 1.9 installed)
| pum twp r c con |
(pum _ PasteUpMorph new)
extent: 500 at 500.
(twp _ TwoWayScrollPane new)
extent: 200 at 200.
twp scroller addMorph: pum.
r _ RectangleMorph new.
c _ CircleMorph new.
pum addMorph: r.
r position: 0 at 0.
pum addMorph: c.
c position: 100 at 100.
con _ NCConnectorMorph fromMorph: r toMorph: c.
pum addMorph: con.
After evaluating drop the twp morph on the center of the screen. Click
on any connector's end (as to pick that end). Now click on an empty
space inside the PUM (as to drop the connector's end).
On my image that connector's end is not positioning itself at the
cursorPoint but positioning itself in a weird point as: (for example)
999 at 238.
NOTE: While I was testing my example I found that if I instead of using
"twp openInHand" I used "twp openInWorld" (or I used "twp openInHand"
_but_ positioned the morph on the desktop's topLeft corner) the example
works! (meaning that the connector after being disconnected remained in
the right position)
> > Shouldn't it be using the
> > coordinate system of the front-most pasteUpMorph in which the
> > connector's end was dropped?
> The owner of the Connector is the frontmost PUM that the two
> ends have
> in common. In the case where one end is on the desktop and one is in
> a PUM on the desktop, the owner should be the world.
More information about the Squeak-dev