Keeping an array controller sorted?
Keeping an array controller sorted?
- Subject: Keeping an array controller sorted?
- From: Jim Correia <email@hidden>
- Date: Fri, 1 Jul 2005 21:46:45 -0400
I have a CoreData app in which the display order of one of the
entities is important. The entity has a displayOrder attribute.
I use drag and drop to re-order the objects in the table view, and
fix up the displayOrder attribute at drop time.
The problem is how do I re-order the list at undo time?
The first thing I tried was to observe content.displayOrder on the
array controller. This only seems to fire if the affected by the undo
happen to be selected.
The second thing I tried as to observer arrangedObjects.displayOrder,
but if I re-arrange from within there, it goes into a re-arrange
death spiral.
Is the second approach the correct one (with obvious corrections for
avoiding the re-arrange death spiral?)
What documentation should I study to learn more about what key paths
I can observe on array controllers and under what conditions they
will fire?
Thanks,
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden