Re: NSNotification called twice
Re: NSNotification called twice
- Subject: Re: NSNotification called twice
- From: Ken Tozier <email@hidden>
- Date: Thu, 8 Jul 2004 21:49:37 -0400
Jon,
I've been seeing the "double-notification" in one of my classes as
well. I'm not sure this is an answer, but it only seems to be happening
for messages posted from within threads other than the main thread.
What _might_ be happening is that the thread posting the message gets
interrupted by another process and when it's activated again, it posts
another for good measure.
Then again, that might be completely wrong., don't know for certain...
Ken
On Jul 8, 2004, at 1:32 PM, Jonathan Nathan wrote:
on 7/8/04 1:00 PM, Mario Diana at email@hidden wrote:
On Wednesday, July 7, 2004, at 09:31 PM, Jonathan Nathan wrote:
Using the code below, when the Address Book.app changes, the
NSNotification gets called twice. Is there a way to limit this to
just
get called once?
The framework sends so many notifications while its running, most of
which are ignored by any one application, that I don't really think
this is something to worry about. I know that sounds like heresy, but
for what it's worth that's my understanding.
Mario
Thanks for the reply but it's not random nor overloading the
NSNotificationCenter with lots of notifications, it's very predictably
sending two notifications each time the Address Book.app changes and
only
then. My code was just to demonstrate that it was being called, my
actual
code does more when the AB database is changed so this is important.
If I
can determine that it will always send two notifications, then fine, I
can
code to ignore the second one every time but I need to know if this is
going
to be the case on every machine or if it is just something I am seeing
on my
development machine or something endemic to my code that I just don't
understand.
Thanks,
Jon
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.