Re: Sorting NSTableView on two keys
Re: Sorting NSTableView on two keys
- Subject: Re: Sorting NSTableView on two keys
- From: Trygve Inda <email@hidden>
- Date: Fri, 11 Nov 2005 06:06:37 +0000
>
> On Nov 11, 2005, at 12:35 AM, Trygve Inda wrote:
>
>> How can I sort an NSTableView (controlled by an NSArrayController)
>> on two
>> keys?
>>
>> E.g. lastName and then firstName so I get
>>
>> Bob Smith
>> Jon Smith
>>
>
> supply the array controller an array of sort descriptors that
> specifies lastName, and then firstName..
>
>
> Sort Descriptors
>
> http://developer.apple.com/documentation/Cocoa/Reference/Foundation/
> ObjC_classic/Classes/NSSortDescriptor_index.html
>
> setSortDescriptors method on NSArrayController
>
> http://developer.apple.com/documentation/Cocoa/Reference/
> ApplicationKit/ObjC_classic/Classes/NSArrayController.html#//
> apple_ref/doc/uid/20002042-BCIGGDHD
I am trying to do this within IB if possible, but each column in my table
only allows one sortKey. I'd like it set so that if I sort by lastName by
clicking the column header, the list sorts, but also keeps the other column
(firstNam) sorted within each lastname.
Possible?
Thx.
Trygve
_______________________________________________
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