[Q] Connectors

Ned Konz ned at bike-nomad.com
Wed Feb 26 19:22:11 UTC 2003


On Wednesday 26 February 2003 07:30 am, Hernan Tylim wrote:

> 	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?

> 	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?

> 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.

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



More information about the Squeak-dev mailing list