• 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: NSEvent locationInWindow undefined for non-mouse events, how to catch?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?


  • Subject: Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?
  • From: Sean McBride <email@hidden>
  • Date: Wed, 15 Feb 2012 11:12:57 -0500
  • Organization: Rogue Research Inc.

On Tue, 14 Feb 2012 21:08:38 -0800, Kyle Sluder said:

>> Are you calling -type on the events you are receiving? Checking that
>value should make it clear whether the event you have received is a
>mouse event or not.  If not, and you need the mouse location, you can
>get if from NSEvent's +mouseLocation or a relevant window instance's -
>mouseLocationOutsideOfEventStream.
>
>The question is whether any debugging code can be added to catch
>instances where -type isn't being called before asking for the mouse location.

And since no one has said "yes", I've assumed it's "no" and filed <rdar://10868211> with the suggestion.

In the meantime, I'll create a category method that wraps locationInWindow and delegates to mouseLocation or similar otherwise.

Thanks to all who replied,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada



_______________________________________________

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: NSEvent locationInWindow undefined for non-mouse events, how to catch?
      • From: Quincey Morris <email@hidden>
    • Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?
      • From: "Gary L. Wade" <email@hidden>
References: 
 >Re: NSEvent locationInWindow undefined for non-mouse events, how to catch? (From: Jim McGowan <email@hidden>)
 >Re: NSEvent locationInWindow undefined for non-mouse events, how to catch? (From: Kyle Sluder <email@hidden>)

  • Prev by Date: [ Was NSReadPIxel ]
  • Next by Date: Re: copy & isEqual nightmares
  • Previous by thread: Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?
  • Next by thread: Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?
  • Index(es):
    • Date
    • Thread