FROM : Matt Neuburg
DATE : Fri Jul 21 17:23:18 2006
On Fri, 21 Jul 2006 08:09:25 +0200, Andreas Mayer <<email_removed>>
said:
>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.
Right, and that is what I couldn't cause to happen by setting the values in
IB. I may have been confused about what you were after, but the solution you
describe, i.e. call setSortDescriptors: on the NSArrayController, is exactly
what I ended up with as well. m.
--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
DATE : Fri Jul 21 17:23:18 2006
On Fri, 21 Jul 2006 08:09:25 +0200, Andreas Mayer <<email_removed>>
said:
>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.
Right, and that is what I couldn't cause to happen by setting the values in
IB. I may have been confused about what you were after, but the solution you
describe, i.e. call setSortDescriptors: on the NSArrayController, is exactly
what I ended up with as well. m.
--
matt neuburg, phd = <email_removed>, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
| 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

