NSTableView Binding NSSortDescriptor
NSTableView Binding NSSortDescriptor
- Subject: NSTableView Binding NSSortDescriptor
- From: Ben <email@hidden>
- Date: Fri, 25 Nov 2011 21:21:41 +0000
I have a simple NSTableView which uses binding and Core Data (via NSArrayController).
It works fine except the order of table entries is random. So I need an NSSortDescriptor. I add a property to my App Delegate like so..
@property (readonly, strong, nonatomic) IBOutlet NSArray *sortDescriptorArray; (plus @synthesize it in the implementation)
In my applicationDidFinishLaunching method I have...
NSSortDescriptor * sd = [[NSSortDescriptor alloc] initWithKey:@"address" ascending:YES];
sortDescriptorArray = [NSArray arrayWithObject:sd];
In IB I select the NSArrayController and bind 'Sort Descriptors' to my App Delegate with 'Model Key Path' as 'sortDescriptorArray'.
I run the App and it still displays the content jumbled up. Any ideas? I'm at a loss…._______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden