Hi all,

I'm working way too hard to make this work, making me think I've just missed 
something obvious.

I have a window containing two main views. I can drag items from one of the 
views into the other view. That all works fine, and is entirely under the 
control of the drag destination in terms of returning the appropriate drag 
operation to set the right cursor.

I also want to be able to drag the items off to delete them. Since that is 
decided by there being no destination, but just a drop outside the window, 
there is no destination to control the cursor, so I'm trying to use the source 
instead, by implementing -draggedImage:movedTo:, testing the point against the 
window's frame, and setting the disappearing item cursor if outside.

The first thing I find is that the point passed is the bottom, left of the 
image, not the cursor. No biggie, I can get the cursor location directly. The 
main problem is when the cursor moves back inside the window, it may or may not 
come under the influence of the destination view again, so simply forcing it to 
the arrow is inappropriate. This is where I find myself doing too much work: 
I'm having to set a flag when I first reset the cursor and clear it again on 
leaving the window and so on, just to figure out when and when not to touch the 
cursor. Surely this scenario was anticipated in the drag/drop design? What's 
the correct way to do this?

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to