• 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
not seeing NSNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: not seeing NSNotification
      • From: Paul Lynch <email@hidden>
  • Prev by Date: Re: vararg functions in frameworks
  • Next by Date: inconsistent crash drawing a string in a custom browser cell
  • Previous by thread: Re: vararg functions in frameworks
  • Next by thread: Re: not seeing NSNotification
  • Index(es):
    • Date
    • Thread