Cannot remove an observer
Cannot remove an observer
- Subject: Cannot remove an observer
- From: Steve Steinitz <email@hidden>
- Date: Thu, 20 Mar 2008 22:25:00 +1100
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