[ENH][GOODIE] it has an editor too!; questions about drag/drop
ned at bike-nomad.com
Wed Oct 4 15:01:38 UTC 2000
And there's a built-in editor demo that's surprisingly usable.
Should have added the [GOODIE] tag...
I still don't know about the dragging behavior of attached
AttachmentPointMorphs. The behavior of the
AttachmentPointMorphThatStretchesPolygons (a temporary class name,
I suspect) is good: they just drag their attached vertex.
However, the AttachmentPointMorph lets you drag it around and drop
it on other things. This does nothing other than attach it (you
can make the line attach to the rectangle, or the rectangle attach
to the line, and the result looks the same).
I could see making a "shy" AttachmentPoint that avoids being picked
up by the mouse by forwarding mouseDown events to one of its partners
that isn't shy; this would avoid the problem where if you have a line
attached to a shape, and the shape was recently selected, you don't
move the line (both AttachmentPoints lie on top of each other).
I'll try this...
Also, the current behavior when trying to attach to a Morph that doesn't
have any AttachmentPoints on it is to make one, attach it to the Morph,
and then attach to it.
But you may want to control where the AttachmentPoints are on a custom
Morph without programming; I'm thinking of a property setting somewhere
(perhaps inherited along the pasteUp chain) that inhibits this auto-creation
of AttachmentPoints. There is already a property that can be set in the
Morph, pasteUp, or world that sets what kind of AttachmentPoint gets
Feedback is most welcome!
currently: Stanwood, WA
email: ned at bike-nomad.com
More information about the Squeak-dev