Re: Sorting NSTableView on two keys
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