• 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: Sorting NSTableView on two keys
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sorting NSTableView on two keys


  • Subject: Re: Sorting NSTableView on two keys
  • From: Conor Dearden <email@hidden>
  • Date: Fri, 11 Nov 2005 10:48:31 +0100

Use bindings to link your table columns to your array controller, via the
accesors firstName and lastName.  The controller will take care of the rest
for you. It will sort by the previously sorted column when the compare turns
out to be NSOrderedSame. It does this for more than two columns as well in
case the first and last name turns out to be the same.  That is all you
really need to do, but if you want to peek at the inside of the array
controller so that you can verify that it's working you can do so with
NSArrayController method (sortDescriptors:)

Conor Dearden
http://www.bruji.com/


 _______________________________________________
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: Question about NSLocale with NSDateFormatter
  • Next by Date: Re: mysterious memory leak in cocoa ? (FOLLOWUP)
  • Previous by thread: Re: Sorting NSTableView on two keys
  • Next by thread: How to see the arguments of methods from the stack trace during debugging
  • Index(es):
    • Date
    • Thread