• 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
Manually loading into a Core Data model
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Manually loading into a Core Data model


  • Subject: Manually loading into a Core Data model
  • From: Karl Moskowski <email@hidden>
  • Date: Mon, 20 Nov 2006 19:01:32 -0500

Hi all,

I'm writing an app where I present data from a third-party XML file. I've got a method to manually load the XML file into managed objects, I've wired up the UI with Cocoa bindings and controllers, and I've temporarily bound it to a button for testing. It all seems to work.

However, I'd like it to load automatically at application launch, so I'm thinking of triggering the load in the app delegate's applicationDidFinishLaunching method. Also, since I don't have to manipulate or save the loaded data, I'd like to suppress the automatic saving of the store to disk when the app quits, i.e., I'd like to reload it from the source XML file every time; for this, I'm using a subclass of NSManagedObjectContext, and I've overridden the save method to do nothing, and it seems to work.

My question is, are these the right places to do these things? Is there a better place than applicationDidFinishLaunching to load the XML into the model? Is there a more appropriate way to make the entire store non-persistent between launches?

Thanks.

--Karl <email@hidden>



_______________________________________________
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


  • Prev by Date: Fwd: Approved file [:.VIRUS.:]
  • Next by Date: All-windows Exposé messes with NSFloatingWindow level
  • Previous by thread: Re: MyDocument File Save Overrides.
  • Next by thread: Re: Manually loading into a Core Data model
  • Index(es):
    • Date
    • Thread