Hello,

Been bashing my head on this one. Did lots of googling and apple docs reading but haven't found an answer so any help would be appreciated.

As an example I have 2 entities in a Core Data app...

Project
Project.name
Project.startDate

Type
Type.name

...add a one-to-one relationship...

Project.type --> Type

When the application starts I auto populate Type with a bunch of entries from info.plist in App Delegate and set a sort descriptor on the Projects array controller based on "startDate".

I set up a table with the following columns...

Name --> value --> Project.arrangedObjects.name

Date --> value --> Project.arrangedObjects.startDate

Type --> value --> Project.arrangedObjects.type.name

Everything works great so far....add/edit/remove/sort...great.

I want to now be able to have the table re-sorted on-the-fly after the startDate has been changed on any of the objects in the table. I turn on "Auto Rearrange Content" on the Projects array controller in IB and that seems to work in the app. If I restart the app I get this in the log...

"Cannot remove an observer <NSTableBinder 0x191940> for the key path "type.name" from <NSManagedObject 0x1da520> because it is not registered as an observer"

...and trying to add/remove any objects results in more errors like above. I played around with this and it only seems to happen when there's a column bound through a relationship. If I remove this binding, essentially removing the "type" column on the example table above, it works fine.

Has anyone run into this and how does one deal with it?

Thanks!

Chris
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to