• 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: Notifications in Non-GUI program
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Notifications in Non-GUI program


  • Subject: Re: Notifications in Non-GUI program
  • From: Tom Marchand <email@hidden>
  • Date: Thu, 13 Apr 2006 20:19:39 -0400

Thanks, NSRunLoop is what I was looking for.


On Apr 13, 2006, at 7:48 PM, Nick Zitzmann wrote:


On Apr 13, 2006, at 4:44 PM, Nick Zitzmann wrote:

If so, what looping mechanism should I use to wait for notifications?

Notifications work through CFRunLoop, so you'll have to run the run loop at various intervals in order to process notifications.

Sorry, it's been pointed out to me that I'm only half-correct. Let me try again:


1. Notifications posted using NSNotificationCenter are processed immediately on the calling thread.
2. Notifications queued using NSNotificationQueue are processed through CF/NSRunLoop.
3. Notifications posted using NSDistributedNotificationCenter are processed through CF/NSRunLoop.


InstantMessage notifications are posted using method #1, however, they are received in the first place through a connection to iChatAgent, so a CF/NSRunLoop will still be necessary.

Nick Zitzmann
<http://www.chronosnet.com/>

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Notifications in Non-GUI program (From: Tom Marchand <email@hidden>)
 >Re: Notifications in Non-GUI program (From: Nick Zitzmann <email@hidden>)
 >Re: Notifications in Non-GUI program (From: Nick Zitzmann <email@hidden>)

  • Prev by Date: Re: Running out of process VM
  • Next by Date: Re: Running out of process VM
  • Previous by thread: Re: Notifications in Non-GUI program
  • Next by thread: Binding NSTextField to NSURL
  • Index(es):
    • Date
    • Thread