Drag-n-Drop: How to take something back out?
Aaron J Reichow
reic0024 at d.umn.edu
Mon Sep 29 23:28:54 UTC 2003
I'm working on adding drag-n-drop (DnD) capabilities to an app I'm
writing. (Dynapad's calendar/scheduler)
Adding some simple DnD functionality was pretty easy, but I've run into a
problem: I can drag-n-drop morphs *into* the reciever of these morphs, but
I can't take them back out. That is, I'd like to be able to drag the
morphs back out of the container, dropping them into another container,
the trash, etc. But, after a morph has been embedded, it doesn't seem
that I can take it back out unless I bring up a halo around just that
morph, and use the black Pick Up handle- not much of an option on a PDA.
I wrote up a smalll DnD example that exibits this same behavior:
I've experimented with a number of messages- #enableDragNDrop,
#dragEnabled:, #enableDrag:, #enableDrop:, #dropEnabled:, etc. I'm tried
changing these settings on both the container and the morphs I'd like to
drop, but I can't seem to find anything that works. No matter what I try,
when I click-and-hold on one of the submorphs that have been dropped into
the container I'm using, it picks up the *whole* morph, that is, the
topmost container and everything in it.
What am I missing? What do I need to do to make my submorphs draggable
after they've been added?
"corporation, n: an ingenious device for obtaining individual profit
without individual responsibility." :: ambrose bierce
More information about the Squeak-dev