• 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?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: The mouse is where?


  • Subject: Re: The mouse is where?
  • From: Jayson Adams <email@hidden>
  • Date: Fri, 25 Jan 2008 17:43:06 -0800


On Jan 25, 2008, at 4:19 PM, email@hidden wrote:

Ah, thanks for pointing those out, Jayson. Now that you mention them I do remember finding those in the past, way back in Tiger days.

Unfortunately, you don't actually win the $64. Although mouseLocationOutsideOfEventStream is *an* answer -- and an answer is a lot better than no answer -- it isn't *the* answer, because it's not synchronized with the event stream. Although it's where the mouse is *now*, it's not where the mouse is "now", but rather where the mouse "will be" when all the events currently queued have been dispatched.

I wasn't trying to answer your main question, just the one about how do you figure out where the mouse is at any time. But I also argue that the only thing that *ever* really matters is where the mouse is, as you say, *now*. Unless I'm trying to store every spot the mouse has been, I don't ever want to operate on a queue of stale mouse locations. If I'm dragging out a selection rect, for example, it's a bug if the corner of the selection rect is not always under the mouse.


At risk of being long-winded, I'll add that there are 2 situations where the distinction between now and "now" matters:

-- When an application starts up. Depending where the mouse is relative to the window that opens, something in that window might get rollover highlighted inappropriately.

-- When the first responder status changes to another view (such as a text field) and then changes back again without involving the mouse (such as tabbing back to the original view).

I didn't follow your examples. In general, before you decide to highlight anything (e.g. in response to a mouseEntered: message) you can always check to see if the mouse is really within the tracking rect bounds. If it isn't, don't highlight anything.


Best,


__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:
    • The mouse is where, again?
      • From: Quincey Morris <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)

  • Prev by Date: Re: Getting the content-type in a HTTP response
  • Next by Date: Help about the "QCCompositionLayer"
  • Previous by thread: Re: The mouse is where?
  • Next by thread: The mouse is where, again?
  • Index(es):
    • Date
    • Thread