• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Keeping an array controller sorted?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: What's the difference between a C++ and ObjC String?
  • Next by Date: Re: Flat Button Controls in Tiger
  • Previous by thread: NSNumberFormatter OS X v10.4 enhancements
  • Next by thread: XML in NSTableView using Cocoa Bindings
  • Index(es):
    • Date
    • Thread