• 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
Re: NSArrayController & NSTreeController default sort order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController & NSTreeController default sort order


  • Subject: Re: NSArrayController & NSTreeController default sort order
  • From: "I. Savant" <email@hidden>
  • Date: Tue, 22 Jan 2008 14:57:13 -0500

On Jan 22, 2008 2:52 PM, Chris Schmitt <email@hidden> wrote:
> I understand what you are saying about the objects in the controller
> not being sorted, but I am confused on why I would need a separate
> entity to have my sort order stored correctly.  If I could retrieve
> the data using that "sortOrder" attribute, why couldn't I just use any
> of the entity attributes to retrieve the sorted objects?

  ??   I never said anything about a separate entity.

> Also after reading the posts, I wonder if it would make more sense to
> set a default sort order on the tree's and tables that are using the
> data instead of handling it in the controller.  Is this the
> "preferred" way to show the data with a default sort order?

  Re-read my post. If you're using bindings, it's best to set the sort
descriptors of the controller driving the view(s) to which they are
bound. Using Core Data, simply add a "sortOrder" attribute to your
entity and use that as the sort key when setting your descriptors.

--
I.S.
_______________________________________________

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

References: 
 >NSArrayController & NSTreeController default sort order (From: Chris Schmitt <email@hidden>)
 >Re: NSArrayController & NSTreeController default sort order (From: "Kyle Sluder" <email@hidden>)
 >Re: NSArrayController & NSTreeController default sort order (From: "I. Savant" <email@hidden>)
 >Re: NSArrayController & NSTreeController default sort order (From: "I. Savant" <email@hidden>)
 >Re: NSArrayController & NSTreeController default sort order (From: Chris Schmitt <email@hidden>)

  • Prev by Date: Re: NSArrayController & NSTreeController default sort order
  • Next by Date: mouse down in table view without selecting the row
  • Previous by thread: Re: NSArrayController & NSTreeController default sort order
  • Next by thread: FSPathCopyObjectAsync Help
  • Index(es):
    • Date
    • Thread