• 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: extending automatic core data entity classes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >extending automatic core data entity classes (From: Damien Cooke <email@hidden>)

  • Prev by Date: Re: extending automatic core data entity classes
  • Next by Date: Re: Program not working under Snow Leopard
  • Previous by thread: Re: extending automatic core data entity classes
  • Next by thread: Updating tracking areas Rect
  • Index(es):
    • Date
    • Thread