Re: extending automatic core data entity classes
Re: extending automatic core data entity classes
- Subject: Re: extending automatic core data entity classes
- From: Quincey Morris <email@hidden>
- Date: Mon, 28 Dec 2009 04:02:00 -0800
On Dec 27, 2009, at 22:59, Damien Cooke wrote:
> iPhone Simulator 3.1 (139.1), iPhone OS 3.1.2 (7D11)
> *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSManagedObject returnAdditiveWarningByType]: unrecognized selector sent to instance 0x3a2d580'
>
>
> It is called like this in the code
> AdditiveEntity *additiveEntity = (AdditiveEntity *)[fetchedResultsController objectAtIndexPath:indexPath];
> if ([additiveEntity returnAdditiveWarningByType] == ADDITIVE_WARNING_TYPE_WARNING)
> {
> ....
> }
...
> @interface AdditiveEntity : NSManagedObject {
>
> }
Assuming no other bugs (such as your fetch request fetching the wrong objects) this is telling you that these objects are NOT being created as your AdditiveEntity subclass, but as a generic NSManagedObject.
Your Core Data model controls whether a subclass is created or not. Most likely you forgot to specify your custom class name in the entity description in the model.
_______________________________________________
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