Re: creating a cocoa nsapp event polling callback
Re: creating a cocoa nsapp event polling callback
- Subject: Re: creating a cocoa nsapp event polling callback
- From: Daniel Dickison <email@hidden>
- Date: Thu, 27 Sep 2007 15:19:08 -0400
I guess I'm looking something like this:
- (void)
publicMethodCalledBeforePollingNSApplicationsNextEventsPerFrame;
Is there anything like this?
How about overriding NSApplication's -sendEvent:?
The problem with -sendEvent: is that it doesn't get called for mouse-
up events if a control takes over the event queue in an event
tracking run loop (which NSButton etc. does).
I think Quartz Event Taps are the correct way to do this, although I
haven't used it myself:
http://developer.apple.com/documentation/Carbon/Reference/
QuartzEventServicesRef/Reference/reference.html
Before I learned about Quartz Events, I implemented something similar
by hacking -sendEvent: and the various NSControl subclasses' -
mouseDown: and using +poseAsClass:. Not recommended, though you can
get it to work...
Daniel
_______________________________________________
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