• 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
Custom NSManagedObject Class Initializer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Custom NSManagedObject Class Initializer


  • Subject: Custom NSManagedObject Class Initializer
  • From: Richard Somers <email@hidden>
  • Date: Sat, 14 Mar 2009 21:02:31 -0600

I have a custom NSManagedObject class MyEntity. It works just fine. However when I add an initializer and override the superclass's designated initializer an error occurs.

[< MyEntity 0x1f3f70> valueForUndefinedKey:]: the entity (null) is not key value coding-compliant for the key myAttribute.

The initializer in MyEntity looks like this.

- (id)initWithEntity:(NSEntityDescription *)entity
    insertIntoManagedObjectContext:(NSManagedObjectContext *)context
{
    [super initWithEntity:entity
        insertIntoManagedObjectContext:context];
    return self;
}

Why does the superclass initializer work but my override does not?

Richard

_______________________________________________

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: Custom NSManagedObject Class Initializer
      • From: Kyle Sluder <email@hidden>
    • Re: Custom NSManagedObject Class Initializer
      • From: mmalc Crawford <email@hidden>
  • Prev by Date: Re: How to create an NSDecimal?
  • Next by Date: Re: Custom NSManagedObject Class Initializer
  • Previous by thread: Re: iPhone UIWebView height?
  • Next by thread: Re: Custom NSManagedObject Class Initializer
  • Index(es):
    • Date
    • Thread