On Sat, Mar 14, 2009 at 11:02 PM, Richard Somers
<rsomers.li...@infowest.com> wrote:
> 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.

Not only should you not do this, if you do you really need to return
the result of super's implementation.

- (id)initWithEntity:(NSEntityDescription *)desc
insertIntoManagedObjectContext:(NSManagedObjectContext *)ctx
{
  if(self = [super initWithEntity:desc insertIntoManagedObjectContext:ctx])
  {
     // do things here
  }

  return self;
}

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to