Re: Subclassing NSManagedObject
Re: Subclassing NSManagedObject
- Subject: Re: Subclassing NSManagedObject
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 6 Jun 2006 23:08:41 -0700
On Jun 6, 2006, at 9:20 PM, David Alter wrote:
To debug I have added the method "- (id)initWithEntity:
(NSEntityDescription *)entity insertIntoManagedObjectContext:
(NSManagedObjectContext *)context" to my subclass of
NSManagedObject. I know this is not recommended but I wanted to
make sure my class was getting created.
In addition to "Can you provide a sample of your getters and
setters?" did you invoke the superclass's method correctly?
It is initializing my subclass but none of my set methods are being
called. I'm not clear on how my objects should be initialized with
the data from disk. I assumed that it would use set methods and key
value coding to set the data.
No, it doesn't (doing so would emit change notifications):
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreDataFramework/Classes/NSManagedObject_Class/Reference/
Reference.html#//apple_ref/occ/instm/NSManagedObject/
setPrimitiveValue:forKey:>
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden