Re: postNotificationName Executes Many Times for a Single Invocation
Re: postNotificationName Executes Many Times for a Single Invocation
- Subject: Re: postNotificationName Executes Many Times for a Single Invocation
- From: Bing Li <email@hidden>
- Date: Mon, 06 Jun 2011 22:01:18 +0800
Dear Graham,
You are right. I am trying to fix the bug.
Thanks so much!
Best regards,
Bing
On Mon, Jun 6, 2011 at 9:46 PM, Graham Cox <email@hidden> wrote:
>
> On 06/06/2011, at 11:40 PM, Bing Li wrote:
>
> > The log is shown as follows similarly. This log tells a single invocation
> > got three notifications. Why?
>
>
> Probably because you subscribed to the same notification three times.
>
> The notification center doesn't bother to work out that you've already
> asked for a given notification from a given target, it just adds it to its
> list of subscribers. If that contains the same object three times, it gets
> called three times.
>
> --Graham
>
>
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden