Implementing UNDO
Klaus major-k
klaus at major-k.de
Fri May 21 10:42:37 EDT 2021
Hi Brian,
> Am 21.05.2021 um 16:25 schrieb Brian Milby via use-livecode <use-livecode at lists.runrev.com>:
>
> For text, the method will depend on the size of the text. In general, implement an undo stack and a redo stack. For single line fields it could simply be a list for each. After each change, add entry to undo list and clear redo list. When doing undo, move entries to redo list allowing forward/backward movement between changes.
>
> For longer text, an array based stack could be used. Either store the full text or use the diff library - method will depend on size of text.
thank you, very helpful!
Best
Klaus
--
Klaus Major
https://www.major-k.de
https://www.major-k.de/bass
klaus at major-k.de
More information about the use-livecode
mailing list