Re: Calling -addObserver:forKeyPath:… more than once

2011-08-26 Thread Rick Mann
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://he

Re: Calling -addObserver:forKeyPath:… more than once

2011-08-26 Thread Rick Mann
Thanks for verifying! On Aug 26, 2011, at 11:42 , Sean McBride wrote: > On Fri, 26 Aug 2011 09:09:19 -0500, Heath Borders said: > >> You must call remove as many times as you call add. Otherwise, >> subclasses and superclasses would interfere with each other's >> observations. > > Also, see th

Re: Calling -addObserver:forKeyPath: … more than once

2011-08-26 Thread Sean McBride
On Fri, 26 Aug 2011 09:09:19 -0500, Heath Borders said: >You must call remove as many times as you call add. Otherwise, >subclasses and superclasses would interfere with each other's >observations. Also, see the 10.7 Foundation Release Notes "More Precise Removal of Key-Value Observers". -- __

Re: Calling -addObserver:forKeyPath:… more than once

2011-08-26 Thread Heath Borders
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 wrote: > Is -addObs

Calling -addObserver:forKeyPath:… more than once

2011-08-26 Thread Rick Mann
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:forK