• 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
Too many replies to Notifications
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Too many replies to Notifications


  • Subject: Too many replies to Notifications
  • From: Chad Armstrong <email@hidden>
  • Date: Thu, 14 Aug 2003 02:18:08 -0500

I have two different classes in the same application, and each uses
NSNotificationCenter to determine when a new NSTask has been launched
and then completed. Each class uses a different selector when the task
has terminated.

Example code:

[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(doSomething:)
name:NSTaskDidTerminateNotification
object:nil];

My problem is that when a new task is finished, BOTH of the selector
methods (i.e. doSomething: and doSomething2:) are both called. Why is
this happening, and now might I circumvent this problem? The prototype
to doSomething would look like this:

- (void) doSomething : (NSNotification *)aNotification;

Chad Armstrong
email@hidden
_______________________________________________
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.

  • Follow-Ups:
    • Re: Too many replies to Notifications
      • From: Charles Srstka <email@hidden>
  • Prev by Date: String Encoding for region
  • Next by Date: Getting the name of a class
  • Previous by thread: String Encoding for region
  • Next by thread: Re: Too many replies to Notifications
  • Index(es):
    • Date
    • Thread