Re: Handling NSApplicationDefined events
Re: Handling NSApplicationDefined events
- Subject: Re: Handling NSApplicationDefined events
- From: "McLaughlin, Michael P." <email@hidden>
- Date: Thu, 3 Sep 2009 16:39:43 -0400
- Acceptlanguage: en-US
- Thread-topic: Handling NSApplicationDefined events
Quincey Morris wrote:
>It's straightforward. Subclass NSApplication and override sendEvent:
>to test for NSApplicationDefined.
>
>Don't forget to specify your subclass as the "Principal Class" in your
>target's properties.
The one example I found like that passed the event on even though it had
been handled.
Is
@interface MyApplication : NSApplication
{
}
@implementation MyApplication
-(void)sendEvent:(NSEvent *)evt
{
if ([evt type] == NSApplicationDefined)
<doSomething>
else
[super sendEvent:evt];
}
@end
better?
--
Mike McLaughlin
_______________________________________________
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