• 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
Core Data and Document Packages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Core Data and Document Packages


  • Subject: Core Data and Document Packages
  • From: Seth Willits <email@hidden>
  • Date: Tue, 3 Jul 2007 01:38:33 -0700

Aloha,


I'm taking the plunge and switching a fair chunk of code to using Core Data instead of my own management of an SQLite database. At least that's the current plan. ;)


My document-based app has a document type which uses a package instead of just a single file to store data in, because there is a need to store related files inside the package as well. Currently I'm doing some relatively simple overloading of standard NSDocument methods to open and save the database by using a path based off of the -fileName.

With NSPersistentDocument, by default it uses the document's - fileName as the path for the persistent store. What is the best way to retarget it so that it uses a different path within the package? I imagine someone here must have done it, so I'm hoping to not have to fiddle for so long to figure it out, however it seems that I might simply be able to override configurePersistentStoreCoordinatorForURL:ofType:error: and pass a different URL to super's implementation? Will there be any side effects to this?


Thanks. Total Core Data newb,

--
Seth Willits



_______________________________________________

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


  • Follow-Ups:
    • Re: Core Data and Document Packages
      • From: Kevin Hoctor <email@hidden>
    • Re: Core Data and Document Packages
      • From: "Timothy J. Wood" <email@hidden>
    • Re: Core Data and Document Packages
      • From: mmalc Crawford <email@hidden>
  • Prev by Date: Re: Cocoa and dead-code stripping
  • Next by Date: NSTokenFieldCell issues
  • Previous by thread: Re: Disable Font Features (Kerning)
  • Next by thread: Re: Core Data and Document Packages
  • Index(es):
    • Date
    • Thread