On Tue, Jul 03, 2007 at 01:50:30PM -0400, Derek Atkins wrote: > Unfortunately the way GnuCash/QOF works makes this sort of autosave > process very difficult to implement. QOF tries to make it's data look > like a "database", not a "data file", so it really does abstract out > these things.
Gnucash does have a "save as..." menu item. Is it possible for the autosave to hook into that set of calls, insead of the save in order to implement the logic Eric outlines below? I do like that logic for auto-save functionality. If this is difficult, allowing the user to turn off auto-save is sufficient. --Beth > "Eric Ladner" <[EMAIL PROTECTED]> writes: > > > Kind of like how 'vi' does it too. Here's the rough logic... > > > > (on startup) > > if (alternate file exists) > > // something went wrong.. prompt user for option of reloading saved > > checkpoint > > if (user says yes) > > load checkpoint > > else > > delete file > > > > (timed) save to alternate file > > if (user saves file) > > delete checkpoint > > > > (on exit) > > if (not saved) > > prompt user to save > > if (user says yes) > > save file > > delete checkpoint > > > > That way, you're not saving over the "official" data file, but saving to an > > alternate file that always has the same name (<account>.ckpt" maybe). When > > loading account <account>, if a checkpoint exists, something bad happened > > and you can restore to that checkpoint, or just load the original file > > (rollback all the way to last session). > > -derek > > -- > Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory > Member, MIT Student Information Processing Board (SIPB) > URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH > [EMAIL PROTECTED] PGP key available > _______________________________________________ > gnucash-devel mailing list > [email protected] > https://lists.gnucash.org/mailman/listinfo/gnucash-devel -- Beth Leonard http://www.LeonardFamilyVideos.com _______________________________________________ gnucash-devel mailing list [email protected] https://lists.gnucash.org/mailman/listinfo/gnucash-devel
