• 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: 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

  • Follow-Ups:
    • Re: Sorting NSTableView on two keys
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Sorting NSTableView on two keys (From: Scott Anguish <email@hidden>)

  • Prev by Date: Re: Sorting NSTableView on two keys
  • Next by Date: Re: Sorting NSTableView on two keys
  • Previous by thread: Re: Sorting NSTableView on two keys
  • Next by thread: Re: Sorting NSTableView on two keys
  • Index(es):
    • Date
    • Thread