• 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: The mouse is where, again?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The mouse is where, again?


  • Subject: Re: The mouse is where, again?
  • From: Jayson Adams <email@hidden>
  • Date: Mon, 28 Jan 2008 10:51:32 -0800


On Jan 28, 2008, at 10:24 AM, Clark Cox wrote:

Obviously incorrect, and this error would not occur with the code
snippet I provided.

I hate to break it to you, but it most certainly will, for exactly the reasons that Quincy stated. If the mouse is moving quickly enough (or the computer is moving slowly enough), your code will be reading the wrong location of the mouse, and can see the mouse move *after* the mouseUp has been posted to the queue, but still think the mouse is down.

The mouse won't move that fast.

My code won't go that slow.

If I really care about this thought experiment, I can sweep the queue for a mouse up event before I act on a mouse move (BTW, if this discussion was about tracking rects, how did it devolve into a discussion of mouse drags?).

If you guys want to pay attention to the mouse location in the event, GO AHEAD. You'll get cool behavior like you see in Safari where a bookmark bar item is lit up even though the mouse isn't over it. Or in a drag loop your selection rect will continue to flop around after the user has stopped moving the mouse. You guys obviously know this stuff better than I do.

Q.M. originally asked how you get the current mouse location. I spoke up, and he mistakenly decided I was answering his entire post. Sorry I tried to help. Please continue on your trek in the wilderness.


__jayson

Circus Ponies NoteBook - Organization for a Creative Mind
www.circusponies.com



_______________________________________________

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


  • Follow-Ups:
    • Re: The mouse is where, again?
      • From: "Hamish Allan" <email@hidden>
References: 
 >The mouse is where? (From: email@hidden)
 >Re: The mouse is where? (From: Jayson Adams <email@hidden>)
 >Re: The mouse is where? (From: email@hidden)
 >Re: The mouse is where? (From: Jayson Adams <email@hidden>)
 >The mouse is where, again? (From: Quincey Morris <email@hidden>)
 >Re: The mouse is where, again? (From: Jayson Adams <email@hidden>)
 >Re: The mouse is where, again? (From: Quincey Morris <email@hidden>)
 >Re: The mouse is where, again? (From: Jayson Adams <email@hidden>)
 >Re: The mouse is where, again? (From: "Clark Cox" <email@hidden>)

  • Prev by Date: Re: Can't get a Parent-Child CoreData relationship working
  • Next by Date: Keeping the User Informed during Startup
  • Previous by thread: Re: The mouse is where, again?
  • Next by thread: Re: The mouse is where, again?
  • Index(es):
    • Date
    • Thread