Re: Handling NSApplicationDefined events
Re: Handling NSApplicationDefined events
- Subject: Re: Handling NSApplicationDefined events
- From: Quincey Morris <email@hidden>
- Date: Thu, 3 Sep 2009 10:50:38 -0700
On Sep 3, 2009, at 08:58, McLaughlin, Michael P. wrote:
The relevant docs make it clear how to send an NSApplicationDefined
NSEvent,
e.g., to NSApp, but I cannot find anything, esp. no examples, about
how to
handle events of this type.
I was assuming that it could be done in AppDelegate. Perhaps not --
but I'd
really like to see a description and one example if there is one
somewhere.
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.
_______________________________________________
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