Re: Sorting on a table view of a managed object - debugger throws exception
Re: Sorting on a table view of a managed object - debugger throws exception
- Subject: Re: Sorting on a table view of a managed object - debugger throws exception
- From: Steve Cronin <email@hidden>
- Date: Thu, 02 Jul 2009 21:51:38 -0500
Quincey;
Do you in fact have a "code" property? On the app delegate? What's
does it's @property (or accessor prototype) look like?
The 'code' property is declared on an entity: MyEntity.
The accessors were created by XCode itself using the 'Copy Method
Declaration/Implementation to Clipboard'
- (NSString *)code {
NSString * tmpValue;
[self willAccessValueForKey: @"code"];
tmpValue = [self primitiveValueForKey: @"code"];
[self didAccessValueForKey: @"code"];
return tmpValue;
}
- (void)setCode:(NSString *)value {
[self willChangeValueForKey: @"code"];
[self setPrimitiveValue: value forKey: @"code"];
[self didChangeValueForKey: @"code"];
}
The accessors work because the table is sorted when first presented.
Sorted according to the sortDescriptor which is declared in
MyAppDelegate and bound using IB to MyArrayController.
SortDescriptor is, of course, an NSArray - which is also named 'code'.
Furthermore this all works peachy in a Release build on either Tiger
or Leopard.
Clicking on tableColumn headers sort just as expected.
But not in Debug build - In Debug if I click on table column header I
get thrown into an error:
Error setting value for key path value of object <MyAppDelegate:
0x852600> (from bound object <MyArrayController:
0x3cbe30>[entity:MyEntity, number of selected objects: 1](null)): [<
MyAppDelegate 0x852600> setValue:forUndefinedKey:]:
Steve
_______________________________________________
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