• 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: NSEvent and postEvent:atStart
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSEvent and postEvent:atStart
      • From: koko <email@hidden>
References: 
 >NSEvent and postEvent:atStart (From: koko <email@hidden>)

  • Prev by Date: NSEvent and postEvent:atStart
  • Next by Date: Re: NSEvent and postEvent:atStart
  • Previous by thread: NSEvent and postEvent:atStart
  • Next by thread: Re: NSEvent and postEvent:atStart
  • Index(es):
    • Date
    • Thread