On Feb 23, 2012, at 12:09 PM, Markus Spoettl <ms_li...@shiftoption.com> wrote: > 1) On -mouseMoved: locate object under the cursor and highlight it so the > user knows which one of them will be operated on when the mouse goes down. > > 2) On -mouseDown: locate object under the cursor and prepare it for dragging > (by remembering it). > > 3) On -mouseDragged: drag the object selected in (2) > > Pretty standard stuff. Of course this relies on steps (1) and (2) locating > the same object. > > Apparently one can't assume (1) and (2) produce the same coordinates, > although I think that's a bug or at least it's unclear what the relationship > of coordinates between mouseMoved: and mouseDown: is.
One alternative: 1. On -mouseMoved: locate and highlight and remember the object under the cursor 2. On -mouseDown: do nothing 3. On -mouseDragged: drag the most recent object remembered by #1. This works if the difference between the last -mouseMoved: and -mouseDown: is not too large. Try both and see which gives the better user experience. -- Greg Parker gpar...@apple.com Runtime Wrangler _______________________________________________ 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com