Re: NSEvent and postEvent:atStart
Re: NSEvent and postEvent:atStart
- Subject: Re: NSEvent and postEvent:atStart
- From: Graham Cox <email@hidden>
- Date: Fri, 25 May 2012 11:48:09 +1000
On 25/05/2012, at 10:58 AM, koko wrote:
> How does one create and then receive a user defined event?
>
> I have read and find only what appears to me to be heavyweight processes.
>
> So if I create an NSEvent and then use postEvent:atStart what I am not getting is how is a method in an object associated with the NSEvent?
>
> Or should I just fugehabodit an use notifications?
>
> But, I really want to understand postEvent:atStart.
It just puts the event into the queue.
Another object will pull events off the queue. If it is looking for and understands your user event, it will process it, maybe by passing it to a specific method of an object. You can't associate a handler method of a specific object with the event in advance, so it can't just end up somewhere by magic.
Sounds to me like notifications might be a better idea if you are just trying to communicate within the app. What are you actually trying to do?
--Graham
_______________________________________________
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