• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cannot remove an observer ... because it is not registered as an observer.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cannot remove an observer ... because it is not registered as an observer.


  • Subject: Re: Cannot remove an observer ... because it is not registered as an observer.
  • From: Jens Alfke <email@hidden>
  • Date: Sun, 4 May 2008 22:07:01 -0700


On 4 May '08, at 3:35 PM, Steve Steinitz wrote:

Cannot remove an observer <NSTableBinder 0x158a70> for the key path "name" from <Alternative 0x15abd0> because it is not registered as an observer.

"It" refers to the observer. -removeObserver:forKeyPath: raises this exception if told to remove an object that isn't currently registered as an observer. So what's happening is that a table view is trying to unregister as an observer from one of your objects that it unfortunately didn't previouly register as an observer for.


The usual cause of this is that you have a property that isn't KVO- compliant. Something accesses your 'foo' property and registers as an observer of that property, and also as an observer of the object that's the property's current value; you change the value of 'foo' without letting anyone know; the observer then later decides to stop observing, gets your 'foo' property, and removes itself as an observer of that object. But it's no longer the same object that it registered as an observer for...

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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

  • Follow-Ups:
    • Re: Cannot remove an observer ... because it is not registered as an observer.
      • From: Jack Repenning <email@hidden>
References: 
 >Cannot remove an observer ... because it is not registered as an observer. (From: Steve Steinitz <email@hidden>)

  • Prev by Date: Re: Newbie Question: Controls not redrawing on changes
  • Next by Date: Re: Cocoa-dev Digest, Vol 5, Issue 727
  • Previous by thread: Cannot remove an observer ... because it is not registered as an observer.
  • Next by thread: Re: Cannot remove an observer ... because it is not registered as an observer.
  • Index(es):
    • Date
    • Thread