• 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
Registering for NSNotification during notification post
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Registering for NSNotification during notification post


  • Subject: Registering for NSNotification during notification post
  • From: Drew McCormack <email@hidden>
  • Date: Mon, 10 Jun 2002 21:27:36 +0200

Can you register for a notification in a method called during the posting of a notification?
I am trying to do exactly this. It works for one notification, but another one does not seem to get registered.

To make a bit more clear what I am on about: I post a notification, say @"Notif1". The default notification center calls a method, and in that method I try to register for other notifications, say @"Notif2" and @"Notif3". Later, when @"Notif3" is posted, the registered selector does not get called. The correct selector does get called for @"Notif2". The order that @"Notif2" and @"Notif3" are registered has no effect.

To complicate things further, this all happens in a worker thread.

Can anyone tell me if this is allowed, and, if so, what could be going wrong?

Drew McCormack
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: proper syntax for static variables in a class
  • Next by Date: NSFormatter Question: NSTextField should not be left blank
  • Previous by thread: Re: Losing data with new archiving method?
  • Next by thread: Cocoa forums website
  • Index(es):
    • Date
    • Thread