Re: NSManagedObjectContext - Key Value compliant
Re: NSManagedObjectContext - Key Value compliant
- Subject: Re: NSManagedObjectContext - Key Value compliant
- From: email@hidden
- Date: Sun, 28 Oct 2007 10:58:26 -0400
On Oct 28, 2007, at 3:04 AM, Keith Wilson wrote:
Using Xcode 2.4 Tiger 10.4.10 I had a subclass of an
NSManagedObjectContext and used setValue and valueForKey on the
extra ivars I had defined. Worked fine on Tiger PPC and Intel. The
compiled app failed to launch in Leopard.
I have imported the project into XCode 3.0, Intel Leopard 10.0. I
have so far found that most (probably every) setValue:ForKey and
valueForKey on any of the iVars for the subclassed Moc fails. No
message, no warning, not even when using the debugger, silence - and
not going nowhere fast.
To be clear, did you subclass NSManagedObject or NSManagedObjectContext?
How are you creating the object? Are you sure the object you are
messaging is your subclass?
Is this a bug or has there been a design change that I have missed.
I can get-around it by adding glue code for each get and each set in
the Moc subclass
What do you mean by glue code? Are you referring to accessors?
If you really did subclass NSManagedObjectContext, note that the class
docs "strongly discourage" that:
http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSManagedObjectContext_Class/Reference/Reference.html#/
/apple_ref/doc/uid/TP30001182
It only refers to difficulties with change management and the undo
manager, but from my own observations of Core Data, I suspect that is
only the beginning of the complexities.
I've been working with Core Data on Leopard for months and have not
noticed any KVC problems, but I've never subclassed
NSManagedObjectContext.
Aaron
_______________________________________________
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