SQLite As Application File Format - Undo/Redo
Page 37 of 41
[
prev
] [
next
]
A simple script automatically creates TRIGGERs that record all changes to tables in the database which is the application file
To undo/redo:
Replay relevant parts of the change log
Restore any Tcl variables saved in the change log
Repaint the screen based on new database content
A complete Undo/Redo module is a few hundred lines of Tcl code
Because the history file is in a database on disk, undo/redo histories can grow very large without consuming excess memory
Once written, the same Undo/Redo module can be reused for different applications!