• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Handling NSApplicationDefined events
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Handling NSApplicationDefined events (From: "McLaughlin, Michael P." <email@hidden>)

  • Prev by Date: Re: NSDictionary, allKeys and the NSAutoreleasePool
  • Next by Date: Distinguishing between return and enter in NSTextField
  • Previous by thread: Handling NSApplicationDefined events
  • Next by thread: Re: Handling NSApplicationDefined events
  • Index(es):
    • Date
    • Thread