• 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
Re: NSKeyedArchiver - better ways to autosave documents?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSKeyedArchiver - better ways to autosave documents?


  • Subject: Re: NSKeyedArchiver - better ways to autosave documents?
  • From: Guy English <email@hidden>
  • Date: Wed, 31 Aug 2005 18:00:10 -0400

>Programs managed to auto-save quickly before CoreData
>came along, so there must be another solution.

Instead of autosaving all the time you could keep a journal of what was done. When a file is added, log that, when a file is removed or moved in the list log that, etc. When you do a real save remove the journal. If you open a document and it's journal is still there then you probably crashed. Load the document as normal, run through the journal applying each change, resave immediately, and remove the journal. This way 'Autosave' should be quick and in a catastrophic case the user will only have to put up with a longer document load time. It also has the advantage that, no matter how big your document, saving off the actions will have a constant time.

This would work much easier if your document was a bundle but you could stash the journal in application support if needed.

Hope that helps,
Guy
 _______________________________________________
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: NSKeyedArchiver - better ways to autosave documents?
      • From: Keith Blount <email@hidden>
References: 
 >Re: NSKeyedArchiver - better ways to autosave documents? (From: Keith Blount <email@hidden>)

  • Prev by Date: Re: Where can I find information on making my program apple scriptable?
  • Next by Date: Re: NSKeyedArchiver - better ways to autosave documents?
  • Previous by thread: Re: NSKeyedArchiver - better ways to autosave documents?
  • Next by thread: Re: NSKeyedArchiver - better ways to autosave documents?
  • Index(es):
    • Date
    • Thread