• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSManagedObjectContext - Key Value compliant
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSManagedObjectContext - Key Value compliant (From: Keith Wilson <email@hidden>)

  • Prev by Date: Re: AuthSample
  • Next by Date: Re: Failing downloads (was: Connections not made with new IB)
  • Previous by thread: NSManagedObjectContext - Key Value compliant
  • Next by thread: Re: NSManagedObjectContext - Key Value compliant
  • Index(es):
    • Date
    • Thread