Where is it better to register with NSNotificationCenter in class?
Where is it better to register with NSNotificationCenter in class?
- Subject: Where is it better to register with NSNotificationCenter in class?
- From: Samvel <email@hidden>
- Date: Mon, 24 Mar 2008 23:51:22 -0500
Hi,
I run into troubles trying to register my object with
NSNotificationCenter in class
-(id) init;
Basically here is my constructor:
-(id) init
{
self = [super init];
if( self) {
[[NSNotificationCenter defaultCenter]
addObserver: self
selector : @selector( downloadStarted:)
name : @"DownloadStarted"
object : nil];
//... (at this point self has lost it's original value having
some '<value')
}
return self;
}
So, what method is the best place to put registration with
NSNotificationCenter to? Ultimately I wish it would be done on
automatic basis in similar way as with:
-(id) init;
Thanks.
_______________________________________________
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