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: Jonathan del Strother <email@hidden>
- Date: Sat, 4 Mar 2006 10:58:50 +0000
On 3 Mar 2006, at 21:17, 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.
In the end, after about two hours of dicking around, I simply threw
up my
hands and solved the problem a different way. I never figured out
what the
problem was! So how might I have debugged this? Is there a way to
dig into
the internals of the notification center and see who is registered to
receive what, and to find out exactly what happens when the
notification is
posted? m.
You could tell gdb to print out notifications every time they're sent.
Go to the Breakpoints window, add a new breakpoint on -
[NSNotificationCenter postNotificationName:object:userInfo:]
Add a debugger command 'po $r5', and tick the Continue column (far
right)
This will print notificationName to the gdb console every time a
notification is posted.Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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