• 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: Programmatically sort NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically sort NSTableView


  • Subject: Re: Programmatically sort NSTableView
  • From: Brian Amerige <email@hidden>
  • Date: Wed, 08 Nov 2006 07:57:35 -0500

Quite simply:

NSArray *newDescriptors = [YourTable sortDescriptors];
[YourArrayWhichProvidesDataToYourTable sortUsingDescriptors:newDescriptors];
[YourTable reloadData];


:-)

On Nov 6, 2006, at 11:12 PM, Trygve Inda wrote:

I have an NSTableView with 3 columns. When I click on a header, it sorts on
that column automatically (and reverse order if I click again). How can I do
this programmatically? (ie cause my table to initially appear with a column
already set)?


Thanks,

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

_______________________________________________ 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
References: 
 >Programmatically sort NSTableView (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Mixing Objective-C and C++
  • Next by Date: How is procedure called according to cocoa espresso code
  • Previous by thread: Re: Programmatically sort NSTableView
  • Next by thread: Printing Confusion (Project Builder -> XCode changes)
  • Index(es):
    • Date
    • Thread