LoFPlayer -- Apparent Connectors bug ...
Ned Konz
ned at squeakland.org
Thu Feb 17 19:16:23 UTC 2005
On Wednesday 16 February 2005 6:38 pm, Art Collings wrote:
> Oh ... FYI, in writing the below, I used Connectors2 extensively. I
> noticed the following apparent bug:
>
> 1. Place a Connector in a pasteUpMorph / playfield .
>
> 2. Move the playfield -- everything works fine, the Connector stays in
> place in the playfield.
>
> 3. Move one of the ends of the Connector.
>
> 4. Now when the playfield is moved, the Connector drops down to the
> world below.
>
> A number of variations on this theme cause similar behaviour, all
> related to dragging the lineEndConstraints which then are apparently no
> longer owned by
> the playfield. This behaviour occurs (relatively harmlessly) in my
> application which has subclassed Connectors, and also in the
> non-subclassed variety.
Ordinarily, you'd have the connector actually attached to something. The
ownership of a Connector is usually the innermost PasteUpMorph that contains
(possibly indirectly) the morphs that the Connector is attached to.
Because I never really worried about the ownership of connectors that weren't
attached to anything, it's probable that I made a mistake in assigning
ownership on dropping the ends.
The ownership of Connectors is an interesting problem. Because they can
connect morphs which are owned by different parents (for instance, connecting
morphs that are in two different PasteUpMorphs), I have to find an
appropriate parent for the Connector itself. If I choose the wrong one, the
Connector disappears behind something. So I chose the rule described above:
that the owner of a Connector is the innermost PasteUpMorph that contains
(possibly indirectly) the morphs that the Connector is attached to.
--
Ned Konz
http://bike-nomad.com/squeak/
More information about the Squeak-dev
mailing list
|