On Thu, Sep 4, 2008 at 5:51 AM, Valentin Dan <[EMAIL PROTECTED]> wrote:
> I'm trying to remove all notifications that have a certain object and I
> can't seem to get that to work. I'm doing something like this:
>
> [[NSNotificationCenter defaultCenter] removeObserver:nil name:nil
> object:myObject];
>
> The notifications for this sender keep coming and that causes a problem.
> How can I fix that ?

A good general guideline for NSNotificationCenter methods: if you
aren't passing 'self' as the "observer" parameter, you're probably
doing something wrong. Management of observation should be done by the
observers and not by anything else.

There may be situations where this is not the case, but if there are
then I have yet to encounter one in my years of working on OS X.

Mike
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to