not seeing NSNotification
not seeing NSNotification
- Subject: not seeing NSNotification
- From: "Tyler Riddle" <email@hidden>
- Date: Wed, 7 Jun 2006 11:57:26 -0700
Hello again,
I'm still having troubles with NSNotificationCenter - now my
controller is not seeing an NSNotification being sent by my model. The
model does the following:
NSLog(@"sending notification");
[[NSNotificationCenter defaultCenter]
postNotificationName:@"MBModelStateChanged" object:self
userInfo:info];
and the run log has an entry for "sending notification" so I know my
method is getting called. I register for the notification in my
controller with:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(modelStateChanged:) name:@"MBModelStateChanged"
object:nil];
and the contents of modelStateChanged: is
- (void)modelStateChanged:(NSNotification *)notification
{
NSLog(@"model state changed");
//NSDictionary* modelState = [notification userInfo];
//NSLog([modelState description]);
}
"model state changed" never shows up in the run log. Even if I
register with name:nil object:nil I still don't see the notification
(but I do see quite a few others). I'm at a loss as to what is going
on here. Can anyone give me some advice? Maybe I'm making another
newbie mistake here?
This is for an open-source project to create a new CDRW/DVD-RW/DVD+RW
blanking utility. My notification is being sent in response to a
notification from the disc recording notification center - maybe I'm
stacking too many notifications on top of each other?
Any help is greatly appreciated.
Tyler Riddle
--
Quote: "You need only reflect that one of the best ways to get
yourself a reputation as a dangerous citizen these days is to go about
repeating the very phrases which our founding fathers used in the
struggle for independence."--Charles Austin Beard
Web site: http://tylerriddle.com
AIM: The Masta Spice
_______________________________________________
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