Hi, "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). 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. -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 gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel