Re: NSTableView default sort column?
Re: NSTableView default sort column?
- Subject: Re: NSTableView default sort column?
- From: "Joe Goh" <email@hidden>
- Date: Sat, 23 Jun 2007 11:16:05 +0800
On 6/22/07, Tom Cannon wrote:
I want to make my NSTableView be sorted by a particular
column by default, while leaving it open for user sorting if
desired. How do I do that?
Something like this:
NSSortDescriptor* sortDescriptor = [[NSSortDescriptor alloc]
initWithKey: @"some_key" ascending: YES
selector:@selector(caseInsensitiveCompare:)]];
[someTableView setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
Hope that helped!
Joe Goh
FunkeeMonk Technology
http://www.funkeemonk.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden