Re: post events to NSApplication
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