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
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.
Circus Ponies NoteBook - Organization for a Creative Mind
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