• 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
Re: how to debug notification that's never received?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: how to debug notification that's never received?
      • From: Agent M <email@hidden>
References: 
 >how to debug notification that's never received? (From: Matt Neuburg <email@hidden>)
 >Re: how to debug notification that's never received? (From: Cameron Hayne <email@hidden>)

  • Prev by Date: Quicktime sound form pane
  • Next by Date: Re: Parsing a packet Async Socket
  • Previous by thread: Re: how to debug notification that's never received?
  • Next by thread: Re: how to debug notification that's never received?
  • Index(es):
    • Date
    • Thread