• 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
How to simulate autosave in Core Data application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to simulate autosave in Core Data application?


  • Subject: How to simulate autosave in Core Data application?
  • From: Patrick Calahan <email@hidden>
  • Date: Tue, 18 Apr 2006 10:24:28 -0700

Apologies in advance if this is a FAQ or if I'm missing something fundamental. I'm a Cocoa newbie and struggling to figure out how to achieve auto-save-like behavior with a Core Data app that I'm writing.

My goal: Create a single-document application in the same vein as iCal or Address Book - I don't want to expose the 'document' concept to the user. I want to use Core Data to persist the document in / Library/Application Support.

I understand autosave is not "directly supported" by NSPersistentDocument; how is it indirectly supported? I basically need to write code to the document/store to open or save in response to certain events (application start, large changes, application exit). I don't want to bother the user with open and save dialogs.

It's not clear to me whether I'm supposed to call the document or the managed object context directly - I've seen a variety of odd and surprising behaviors (to me, at least) with either approach. I'd like to know what is the proper way to handle this sort of thing.

If anyone has any general tips or a pointer to documentation on what to do here, I'd be much obliged.


Thanks, -p







_______________________________________________
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: How to simulate autosave in Core Data application?
      • From: Jim Correia <email@hidden>
    • Re: How to simulate autosave in Core Data application?
      • From: "I. Savant" <email@hidden>
  • Prev by Date: Re: Comparing NSEntityDescription instances?
  • Next by Date: Re: How to simulate autosave in Core Data application?
  • Previous by thread: Re: What happens to my German strings?
  • Next by thread: Re: How to simulate autosave in Core Data application?
  • Index(es):
    • Date
    • Thread