Re: NSManagedObjectContext - Key Value compliant
Re: NSManagedObjectContext - Key Value compliant
- Subject: Re: NSManagedObjectContext - Key Value compliant
- From: Chris Hanson <email@hidden>
- Date: Sun, 28 Oct 2007 16:16:54 -0700
On Oct 28, 2007, at 12: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.
NSManagedObjectContext is not designed to support subclassing. In
particular, you can't guarantee that every usage of
NSManagedObjectContext within Core Data will be using an instance of
your subclass; Core Data can create its own NSManagedObjectContext
instances behind the scenes for various purposes, and if your custom
managed objects expect their context to always be instances of your
NSManagedObjectContext subclass, your code will fail.
For example, think about how persistent store migration may be
implemented.
If at all possible, you'll want to rework your application or
framework code to not rely on your subclass of
NSManagedObjectContext. It should work correctly on both Tiger and
Leopard then.
(I don't know that this would specifically cause the failure to
launch, but since you didn't provide any console messages or
backtraces that's all I can really go on.)
-- Chris
_______________________________________________
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