• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Sorting on a table view of a managed object - debugger throws exception
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Sorting on a table view of a managed object - debugger throws exception
      • From: Quincey Morris <email@hidden>
References: 
 >Sorting on a table view of a managed object - debugger throws exception (From: Steve Cronin <email@hidden>)

  • Prev by Date: Possible NSPredicateEditor bug
  • Next by Date: Replace -[NSKeyedUnarchiver unarchiveObjectWithData:] so it doesn't crash on corrupt archive
  • Previous by thread: Re: Sorting on a table view of a managed object - debugger throws exception
  • Next by thread: Re: Sorting on a table view of a managed object - debugger throws exception
  • Index(es):
    • Date
    • Thread