Re: Initial sort column of NSTableView
Re: Initial sort column of NSTableView
- Subject: Re: Initial sort column of NSTableView
- From: Arthur Clemens <email@hidden>
- Date: Sat, 20 May 2006 18:51:52 +0200
On May 20, 2006, at 6:45 PM, Wain wrote:
Hi,
Have you set a sort descriptor?
http://gemma.apple.com/documentation/Cocoa/Reference/
CocoaBindingsRef/BindingsText/NSTableView.html#//apple_ref/doc/uid/
NSTableView-DontLinkElementID_544
or
http://developer.apple.com/documentation/Cocoa/Reference/
ApplicationKit/ObjC_classic/Classes/NSTableView.html#//apple_ref/
occ/instm/NSTableView/setSortDescriptors:
That's it!
- (void)windowControllerDidLoadNib:(NSWindowController *)
windowController
{
[super windowControllerDidLoadNib:windowController];
NSSortDescriptor* sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey: @"order" ascending: YES] autorelease];
[oTable setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
}
Thanks
Arthur
_______________________________________________
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