Too many replies to Notifications
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.