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 13:01:22 -0500
- Organization: Rogue Research Inc.
On Wed, 15 Feb 2012 09:56:33 -0800, Gary L. Wade said:
>What it sounds like you're really asking in the latest part of this
>thread is for every object in a given runtime to track the messages
>called upon it with a time stamp in order to compare those for an exact
>ordering of calls conducive to your needs.
>
>That COULD be useful, but it would be really resource-intensive,
>especially in a heavy-object-usage process if turned on for every
>object, but it could be turned on only for objects of a particular class
>in your scenario.
I'm only suggesting that locationInWindow be implemented like this:
- (NSPoint)locationInWindow
{
if (NSDebugEnabled)
{
NSEventType type = [self type];
assert ((type == NSLeftMouseDown) || ... );
}
...
}
--
____________________________________________________________
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