Re: Programmatically click a column header in NSTableView
Re: Programmatically click a column header in NSTableView
- Subject: Re: Programmatically click a column header in NSTableView
- From: "Joe Goh" <email@hidden>
- Date: Wed, 24 Jan 2007 19:06:35 +0800
On 1/23/07,Tristan Jehan <email@hidden> wrote:
I've been trying to programmatically click an NSTableHeaderCell to
force the NSTableView to resort the data, and change its current
highlighted header to the new one. The following has no effect and I
don't understand why... Could someone help? Thank you.
What worked for me is to set the sort descriptor for the NSTableView,
something like this:
NSSortDescriptor* sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey: @"some_sort_key" ascending: YES] autorelease];
[someTableView setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
Hope this helps!
Joe Goh
FunkeeMonk Technology
http://www.funkeemonk.com/
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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