Re: how to debug notification that's never received?
Re: how to debug notification that's never received?
- Subject: Re: how to debug notification that's never received?
- From: glenn andreas <email@hidden>
- Date: Sat, 4 Mar 2006 08:30:29 -0600
On Mar 3, 2006, at 6:58 PM, Cameron Hayne wrote:
On 3-Mar-06, at 4:17 PM, Matt Neuburg wrote:
In class A, I post a notification. I know from logging that the
posting code
is being executed.
In class B, I've registered to receive that notification, but it
never
arrives.
I've double-checked the registration, dicking with the
notification name and
all sorts of things, but I can't make the notification arrive.
It might help if you posted the relevant snippets of source code.
There are two things that I can think of right off that you might
be doing wrong.
1) You might be creating your own NSNotificationCenter instead of
using [NSNotificationCenter defaultCenter]
2) You might be doing something like:
[notifCenter addObserver:mainController
selector:@selector
(recievedMountNotification)
name:@"NSWorkspaceDidMountNotification"
object:nil];
instead of:
[notifCenter addObserver:mainController
selector:@selector
(recievedMountNotification)
name:NSWorkspaceDidMountNotification
object:nil];
And then change it again to be:
[notifCenter addObserver: mainController
selector: @selector(recievedMountNotification:)
name: NSWorkspaceDidMountNotification
object: nil];
since the name of the selector includes the colon...
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
Widgetarium | the quickest path to widgets
_______________________________________________
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