Re: How to simulate autosave in Core Data application?
Re: How to simulate autosave in Core Data application?
- Subject: Re: How to simulate autosave in Core Data application?
- From: Jim Correia <email@hidden>
- Date: Tue, 18 Apr 2006 13:34:45 -0400
On Apr 18, 2006, at 1:24 PM, Patrick Calahan wrote:
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 sounds like you should be starting with the Core Data Application,
not Core Data Document-based Application template.
The template/example already handles save on quit for you. If you
want to save more frequently than that you'll have to determine when
(possibly by listening for change notifications from the managed
object context) then ask the managed object context to save, handling
errors as appropriate.
Jim
_______________________________________________
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