Thanks for verifying.

On Aug 26, 2011, at 7:09 , Heath Borders wrote:

> You must call remove as many times as you call add.  Otherwise,
> subclasses and superclasses would interfere with each other's
> observations.
> 
> -Heath Borders
> heath.bord...@gmail.com
> Twitter: heathborders
> http://heath-tech.blogspot.com
> 
> 
> 
> On Fri, Aug 26, 2011 at 4:34 AM, Rick Mann <rm...@latencyzero.com> wrote:
>> Is -addObserver:forKeyPath:… idempotent? I called it multiple times with the 
>> same parameters, but called -removeObserver:forKeyPath: only once, and the 
>> object continued to receive KVO notifications.
>> 
>> After adding code to ensure -addObserver:forKeyPath:… was only called once, 
>> -removeObserver:forKeyPath: seemed to work as expected.
>> 
>> I couldn't find any clear indication in the docs or searching online, 
>> although I did find some things that indicate these APIs rather do suck.
>> 
>> --
>> Rick
>> 
>> _______________________________________________
>> 
>> 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/heath.borders%40gmail.com
>> 
>> This email sent to heath.bord...@gmail.com
>> 
> _______________________________________________
> 
> 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/rmann%40latencyzero.com
> 
> This email sent to rm...@latencyzero.com

_______________________________________________

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 arch...@mail-archive.com

Reply via email to