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: Alastair Houghton <email@hidden>
- Date: Thu, 27 Sep 2007 10:24:51 +0100
On 26 Sep 2007, at 08:38, Tobias Ford wrote:
I'd like to give my NSApp a callback function that will process
specific events such as keys and mouse events before they have the
chance to be processed by the Cocoa frameworks. Anything that I
don't process will then be sent back to NSApplication for standard
processing.
I think that my only option is to overload the run method. I don't
really want to do this due to future maintenance troubles. What
I'm looking for is some method that is called pre-standard-event
processing that I can overload poll my events, send unused events
back to the app, and then call an update function from. I want
something that isn't likely to break with an os update and is public.
I guess I'm looking something like this:
- (void)
publicMethodCalledBeforePollingNSApplicationsNextEventsPerFrame;
Is there anything like this?
How about overriding NSApplication's -sendEvent:?
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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