Drag and Drop a copy
Ross Boylan
RossBoylan at stanfordalumni.org
Fri May 25 01:20:49 UTC 2001
I have an object I'm interested in, call it A. It's in a container C.
It is displayed on the screen with a morph M1, which is embedded in other
morphs.
I have another object B, who display includes the morph M2.
If someone drags M1 to M2 and drops, I want to put A into one of B's variables.
What's the best way to do this? It looks as if the drag n drop protocol is
designed for removing M1 from its morphs and placing it somewhere else. I
want to leave it where it is.
All I really need is to copy the object reference.
I could also copy M1 and replace M2 with M1. This might even be preferable.
I see various stuff about "parts bins" that might be relevant (this is a
lot like pulling items off the flaps), but exactly how that works is
unclear (e.g. parts bin vs donor). I don't see a place to override what
gets dragged (so I could return a copy).
I'd appreciate any pointers.
More information about the Squeak-dev
mailing list
|