• 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: post events to NSApplication
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: post events to NSApplication


  • Subject: Re: post events to NSApplication
  • From: Ken Thomases <email@hidden>
  • Date: Tue, 5 Aug 2008 23:02:45 -0500

On Aug 5, 2008, at 9:18 PM, Jim Crafton wrote:

Is it possible to create a custom event for an apps internal usage and
have it posted to the NSApp, and then processed later on? If so, how
would one do this? I'm not sure how to
a) create the event
b) get notified when the event is recv'd and ready for processing

Yes. Did you look at the NSApplication and NSEvent documentation? NSEvent has several class methods for creating events, and provides the event type NSApplicationDefined for, uh, application-defined events. There's -[NSApplication postEvent:atStart:] and -[NSWindow postEvent:atStart:] for posting events.


Regards,
Ken
_______________________________________________

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: 
 >post events to NSApplication (From: "Jim Crafton" <email@hidden>)

  • Prev by Date: How to use a button to update an application with a text field value
  • Next by Date: Re: How to debug a corrupted stack
  • Previous by thread: post events to NSApplication
  • Next by thread: Re: post events to NSApplication
  • Index(es):
    • Date
    • Thread