KVC error from bound SortDescriptor
KVC error from bound SortDescriptor
- Subject: KVC error from bound SortDescriptor
- From: Steven Hamilton <email@hidden>
- Date: Wed, 14 Jan 2009 21:54:50 +1000
Hi folks,
I have a customer WindowController class and within it I have a method
that returns a NSSortDescriptor. Like this;
-(NSArray *)nameSortDescriptors
{
NSSortDescriptor *sorter;
sorter = [[[NSSortDescriptor alloc]
initWithKey: @"name"
ascending: YES] autorelease];
return ([NSArray arrayWithObject: sorter]);
}
In my NIB I have an NSArrayController serving a Core Data entity
called "Account". I've bound this entity to the SortDescriptor above
and the data is displayed in a bound NSTableview.
I'm getting the following error whenever I click the column header to
re-order the tableView and I can't understand why the array controller
is trying to set the sortdescriptor method or what to do to surpress it.
Error setting value for key path nameSortDescriptors of object
<MLAccountController: 0x58ae390> (from bound object
<NSArrayController: 0x589d1a0>[entity: Account, number of selected
objects: 1](null)): [<MLAccountController 0x58ae390>
setValue:forUndefinedKey:]: this class is not key value coding-
compliant for the key nameSortDescriptors.
_______________________________________________
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