How to notify user as to acceptable drop targets?

Martin McClure martin at
Mon Apr 15 19:18:49 UTC 2002

At 11:05 AM -0700 4/15/02, Ned Konz wrote:
>I'm still not sure how to handle the UI aspects of refusing connection
>(i.e. how would you avoid inheritance loops, multiple inheritance,
>etc. in a class diagram?). The obvious way right now would be to just
>not connect if it were an illegal connection, but you wouldn't know
>until you dropped the end of the connection on something that it
>didn't want to connect to.
>Better, probably, would be to give the user some kind of feedback as
>to allowable connections.

I haven't used drag and drop within Squeak much, but here's my 
general UI preferences for dragging.

I've always rather liked interfaces that give visual feedback on 
allowable drop targets, something like:

If you're dragging something and you move over a valid target to drop 
it on, the target highlights.
If you move on, the highlighting goes away.
If you release the mouse button when you're over a highlighted 
target, you've dropped on that target.
If you release the mouse button when you aren't over a highlighted 
target, the thing you're dragging animates a 'snap back' to where you 
dragged it from.

When the drop target is a large area that you're placing the dropped 
object in, the highlighting can be something like a border around the 

To make this work, the d'n'd framework has to send a message to each 
potential target as you pass over it to see if it would accept the 
dragged object. If this slows things down too much, you could wait 
until the user has paused over a potential target for a few hundred 
milliseconds before sending the message.

Morph>>wantsDroppedMorph:event: might be able to be used for this, 
but I haven't looked to see when it's sent.


More information about the Squeak-dev mailing list