FROM : Andreas Mayer
DATE : Fri Jul 21 08:09:25 2006
Am 21.07.2006 um 07:24 Uhr schrieb Adam Knight:
> I can assure you that it does work for me with the stock sorting
> functions, though. :\
Got it working, too. Thanks!
My problem was, that I did specify a different sort descriptor in -
windowDidLoad. That somehow seems to have invalidated the setting
made from within interface builder.
I'm using my new selector now, and all is well:
old:
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"identifier" ascending:YES selector:@selector(compare:)]
autorelease];
[myArrayController setSortDescriptors:[NSArray
arrayWithObject:sortDescriptor]];
new:
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"identifier" ascending:YES selector:@selector
(numericCompare:)] autorelease];
[myArrayController setSortDescriptors:[NSArray
arrayWithObject:sortDescriptor]];
It will work without these lines. It's just that I want the table to
be initially sorted by that column.
Andreas
DATE : Fri Jul 21 08:09:25 2006
Am 21.07.2006 um 07:24 Uhr schrieb Adam Knight:
> I can assure you that it does work for me with the stock sorting
> functions, though. :\
Got it working, too. Thanks!
My problem was, that I did specify a different sort descriptor in -
windowDidLoad. That somehow seems to have invalidated the setting
made from within interface builder.
I'm using my new selector now, and all is well:
old:
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"identifier" ascending:YES selector:@selector(compare:)]
autorelease];
[myArrayController setSortDescriptors:[NSArray
arrayWithObject:sortDescriptor]];
new:
NSSortDescriptor *sortDescriptor = [[[NSSortDescriptor alloc]
initWithKey:@"identifier" ascending:YES selector:@selector
(numericCompare:)] autorelease];
[myArrayController setSortDescriptors:[NSArray
arrayWithObject:sortDescriptor]];
It will work without these lines. It's just that I want the table to
be initially sorted by that column.
Andreas
| Related mails | Author | Date |
|---|---|---|
| Andreas Mayer | Jul 20, 20:37 | |
| Matt Neuburg | Jul 21, 04:10 | |
| Andreas Mayer | Jul 21, 06:49 | |
| Adam Knight | Jul 21, 07:24 | |
| Andreas Mayer | Jul 21, 08:09 | |
| Matt Neuburg | Jul 21, 17:23 |






Cocoa mail archive

