Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Programmatically sort NSTableView



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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

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: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >Programmatically sort NSTableView (From: Trygve Inda <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.