• 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
NSPersistentDocument - where is setManagedObjectModel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSPersistentDocument - where is setManagedObjectModel


  • Subject: NSPersistentDocument - where is setManagedObjectModel
  • From: Ken Victor <email@hidden>
  • Date: Sat, 24 Sep 2005 17:51:07 -0700

before going much further in my core data document app, i want to implement the hooks and stub procedures to support versioning of my core data model. this means that there will be more than one model (.mom) file in the resources folder of my app package. thus, i don't want the default behavior of merging models found in my bundle (app package). and while i understand how to create a NSManagedObjectModel via:

[[[NSManagedObjectModel alloc] initWithContentsOfURL: momURL] autorelease];

i am a little confused about something. clearly, i don't want to return a newly created NSManagedObjectModel everytime my doc's override of managedObjectModel is called (as is implied by the snippet for the api documentation of NSPersistentDocument managedObjectModel). however, i don't see how to check if i have already created a NSManagedObjectModel for my document, ie, i can't access the private ivar _managedObjectModel to see if it is nil, nor can i set this as there doesn't appear to be a setManagedObjectModel method anyplace.

now, clearly i can handle this by having my own ivar to hold the NSManagedObjectModel i create.

i'm just wondering if i'm missing something obvious?

thanx,
ken
_______________________________________________
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


  • Follow-Ups:
    • Re: NSPersistentDocument - where is setManagedObjectModel
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: using zlib on OS X
  • Next by Date: Re: find what type of object a variable belongs to
  • Previous by thread: Re: find what type of object a variable belongs to
  • Next by thread: Re: NSPersistentDocument - where is setManagedObjectModel
  • Index(es):
    • Date
    • Thread