Sorting an NSTableView by code
Sorting an NSTableView by code
- Subject: Sorting an NSTableView by code
- From: Drarok Ithaqua <email@hidden>
- Date: Fri, 30 Jun 2006 00:35:56 +0100
First, apologies if this was answered recently. I'm sure there was
something at least similar, but I'm not seeing it in the archive...
I'm loading a whole load of files into an NSArrayController (each
file is represented by an NSDictionary).
I can load, and display, all the data fine. But I'd like to
automatically present it sorted after the load.
I've tried the following (and variants similar to the following) to
no avail:
NSSortDescriptor* sorter = [[NSSortDescriptor alloc]
initWithKey:@"tvcArtist" ascending:YES];
[trackController setSortDescriptors:[NSArray arrayWithObject:sorter]];
tvcArtist is the Identifier set in IB against the tableView's column
(tvc = Table View Column),
but I'm stuck - it doesn't sort. Nor does it if I call [tableView
setSortDescrip....
Can someone point me in the right direction?
Many thanks,
- Drarok
_______________________________________________
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