Cannot remove an observer ... because it is not registered as an observer.
Cannot remove an observer ... because it is not registered as an observer.
- Subject: Cannot remove an observer ... because it is not registered as an observer.
- From: Steve Steinitz <email@hidden>
- Date: Mon, 5 May 2008 08:35:01 +1000
Hello,
I now have two projects where I am getting the error below.
I've tried some obvious things like adding calls to will|did
Access|Change ValueForKey to my custom methods and also ensuring
key-value compliance by adding dummy setters. Here is the error.
Cannot remove an observer <NSTableBinder 0x158a70> for the key
path "name" from <Alternative 0x15abd0> because it is not
registered as an observer.
It doesn't help that 'it' is ambiguous.
Is there a workaround? A solution?
I've asked about this previously and have included my previous
post, below.
Thanks,
Steve
------------------------------------------------------------------------
Older post on the same subject: Cannot remove an observer
Hello,
I have what, in WebObjects, we used to call a master-slave
display. I show a list of specific Products based on the
selected Product Model, hereafter referred to as the 'Model'. So
when a user picks a certain Model of sunglasses in the master
list, she sees all the different size/color/lens combinations
(Products) in the slave list. It works nicely.
I use a contentSet binding (programmatically-generated if that
makes a difference) to filter the slave list ie. bind it to the
to-many relationship from Model to Products. **
In the slave (Product) list, I have a popup that allows the user
to change a Product's Model. The popup is usually only used to
fix data entry errors - e.g. specifying the wrong Model for a Product.
Here is my problem. I noticed that changing the Model results
in two exception:
NSRangeException -- Cannot remove an observer
<NSKeyValueObservance 0x30bacf0> for the key path "currentCost"
from <Model 0x2a159a0> because it is not registered as an observer.
and
NSInternalInconsistencyException -- Cannot remove an observer
<ProductCategorySelectingArrayController 0x10e8650> for the key
path "model.currentCost" from <Product 0x1a68130>, most likely
because the value for the key "model" has changed without an
appropriate KVO notification being sent. Check the
KVO-compliance of the Product class.
Googling, I found some other developers who have experienced
this but no answers were offered.
Note that the exceptions are complaining about one of the
Model's attributes: currentCost. At other times, the exception
complains about another attribute: 'active' -- its unclear
whether that refers to the Model's 'active' attribute or the
Product's 'active' attribute.
Should I be reporting a bug?
Thanks,
Steve
** this likely has little to do with my question, but for the
curious: I
programmatically bind a contentSet based on the setting of a radio
button with two choices: 'All' and "Model". "All" means show all
products, "Model" means show just the Products for the selected Model.
I only have the problem in "Model" mode.
_______________________________________________
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