• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSView mouseDown truncated coordinates
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView mouseDown truncated coordinates


  • Subject: Re: NSView mouseDown truncated coordinates
  • From: Greg Parker <email@hidden>
  • Date: Thu, 23 Feb 2012 19:52:07 -0800

On Feb 23, 2012, at 12:09 PM, Markus Spoettl <email@hidden> 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     email@hidden     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden


References: 
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Quincey Morris <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Quincey Morris <email@hidden>)
 >Re: NSView mouseDown truncated coordinates (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: App Crashing in ARC !!
  • Next by Date: [Moderator] Obvious, but lists are back up
  • Previous by thread: Re: NSView mouseDown truncated coordinates
  • Next by thread: Dumb question about radio buttons
  • Index(es):
    • Date
    • Thread