• 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: Binding NSTableView to NSSet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding NSTableView to NSSet


  • Subject: Re: Binding NSTableView to NSSet
  • From: Willeke <email@hidden>
  • Date: Sun, 15 Jul 2012 13:30:56 +0200

Op 14 jul 2012, om 04:46 heeft Koen van der Drift het volgende geschreven:

> A follow up question: how do I now sort the data in the table? I am showing three values in the table, and like to sort based on either one of them. The original data is in an unordered NSSet (from my CD model). I could create an NSArray in my view controller: NSArray *myArray = [myTagsSet allObjects], and bind that to the NSArrayController, instead of to the NSSet; then I can sort the values in the table based on the array using sortDescriptors as explained here: https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/TableView/SortingTableViews/SortingTableViews.html#//apple_ref/doc/uid/10000026i-CH10-SW1.
> Would that be a good approach?
>
> Other alternatives?

Can't you just set the sortDescriptors of the array controller?

Willeke



_______________________________________________

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: 
 >Binding NSTableView to NSSet (From: Koen van der Drift <email@hidden>)
 >Re: Binding NSTableView to NSSet (From: Koen van der Drift <email@hidden>)
 >Re: Binding NSTableView to NSSet (From: Koen van der Drift <email@hidden>)

  • Prev by Date: Re: Core Data Multiuser
  • Next by Date: Re: Core Data Multiuser
  • Previous by thread: Re: Binding NSTableView to NSSet
  • Next by thread: Re: Binding NSTableView to NSSet
  • Index(es):
    • Date
    • Thread