nsarraycontroller "auto rearrange content"
nsarraycontroller "auto rearrange content"
- Subject: nsarraycontroller "auto rearrange content"
- From: Chris Anderson <email@hidden>
- Date: Tue, 03 Feb 2009 13:40:39 -0800
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 (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