Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: The mouse is where, again?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The mouse is where, again?




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


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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.