Re: Custom NSManagedObject Class Initializer

2009-03-15 Thread Benjamin Dobson
On 15 Mar 2009, at 04:03:19, Kyle Sluder wrote: if(self = [super initWithEntity:desc insertIntoManagedObjectContext:ctx]) { This line will generate warnings, which is not helpful in this case. This will not, and is the default for built-in subclasses. As such, I prefer it: self = [s

Re: Custom NSManagedObject Class Initializer

2009-03-14 Thread Kyle Sluder
On Sat, Mar 14, 2009 at 11:02 PM, Richard Somers 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 r

Re: Custom NSManagedObject Class Initializer

2009-03-14 Thread mmalc Crawford
On Mar 14, 2009, at 8:02 PM, Richard Somers 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. [...] { [super initWithEntity:entity insertIntoManagedObjec

Custom NSManagedObject Class Initializer

2009-03-14 Thread Richard Somers
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 myAttribu