[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: Programming challenge: Undo



** Reply to message from Bill Troop  on
Sat, 28 Jun 2008 00:20:53 +0100

Ah, very thoughtful, Bill -- includes much that I had not
considered previously. I had discarded the idea that you could
record every keystroke, and now I've reconsidered it, but I know
from experience that it's not going to work. I've tried it in
the past, many times. You can do it for short bursts of
activity, but to try that for an entire session will fail
miserably. Too many "actions" require a sequence of keystrokes
that cannot be interrupted by a program that memorizes them.

I think there are two viable approaches, and increasingly I'm
inclining that the way to handle this is to use an external EXE
to manage the bulk of the process. One approach, as mentioned
previously, is to trigger backups (snapshots) on user-selected
"actions", via the KBD file, e.g. your DeleteBlock key or your
CoPy key. The other is to take timed snapshots, every X
seconds, and then compare with the last-previous snapshot, and
discard it if identical, similar to Xy4's native AOT facility
but much more flexible. The beauty of the second approach is
simplicity (little or no user configuration), and the fact that
it can run as an asynchronous concurrent process **outside** of
XyWrite -- not slowing XyWrite down noticeably (or at all). In
truth, the same external program could probably handle both
approaches, at the user's option. I don't see any third way to
do it, practically. To make a backup on every keystroke,
 H(backup)
 E(backup)
 L(backup)
 L(backup)
 O(backup)
would be *ridiculous*!

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------