Re: NSEvent locationInWindow undefined for non-mouse events, how to catch?
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