Sorting by index

CQTexperiment
vspader 2006-05-12 19:23:17 +00:00
parent 67b2ada211
commit fe716e1e04
1 changed files with 10 additions and 0 deletions

View File

@ -311,6 +311,16 @@
[a release];
}
- (void)setSortDescriptors:(NSArray *)sortDescriptors
{
//Cheap hack so the index column isn't sorted
NSLog(@"KEY: %@", [[sortDescriptors objectAtIndex:0] key]);
if ([[[sortDescriptors objectAtIndex:0] key] caseInsensitiveCompare:@"displayIndex"] != NSOrderedSame)
{
[super setSortDescriptors:sortDescriptors];
}
}
- (void)sortByPath
{
NSSortDescriptor *s = [[NSSortDescriptor alloc] initWithKey:@"filename" ascending:YES selector:@selector(compare:)];