NSTableColumn value binding + keypath over a relationship
NSTableColumn value binding + keypath over a relationship
- Subject: NSTableColumn value binding + keypath over a relationship
- From: Stamenkovic Florijan <email@hidden>
- Date: Tue, 29 Sep 2009 17:18:17 -0400
Hi all,
I have been experiencing an error in my app that does not make
sense... Here is the situation:
A CoreData app. I have a table and one of it's columns' value bound to
an array controller's "arrangedObjects.group.title". The controller
contains objects of the Note entity. Note relates to a Group (to-one),
and the Group entity has a "title" attribute. Straightforward. Next to
the table I have an outline view containing Groups. I have implemented
drag and drop so that Notes can be dragged from their table to a
different group in the outline view. However, when I have the above
described table column present in the table, I get an error after
dragging that says:
Cannot remove an observer <NSTableBinder 0x177eb0> for the key path
"group.name" from <FSNote 0x1ad240>, most likely because the value for
the key "group" has changed without an appropriate KVO notification
being sent. Check the KVO-compliance of the FSNote class.
I am quite certain that the Note class is KVO compliant for "group",
since I don't do anything to prevent it being, and it's a CoreData
entity with @dynamic property generation.
So, I am wondering, am I doing something wrong? It seems a reasonable
thing to do, binding a column's value to the
"arrangedObjects.relationship.attribute" key path, but maybe that is
not allowed?
I have managed to work around this by binding the column to
"arrangedObjects.group", and using a custom value transformer. This
provides me with exactly the functionality I need, but I am still
wondering about the mechanics, and if I am doing something wrong.
Thanks in advance,
F
_______________________________________________
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