Hi,
I'm in the process of implementing an undo function, boring....
What i found in the archives is:
[B4X] [class] UndoManager
When i try to analyse the undo manager class,i see a variable "ud as undodata" ; it seems that it accepts states of different objects (text from one, color from another..)
But i have many objects with text, many with different colors, most text and color... that change all the time.
Questions:
1. Do i need a Getstate sub for every object-property combination individually?
Can't i backup a "button" and have all its properties implicitely included (text, color, position...)
2. What is the benefit over declaring a "backup" view/variable and do a copy at certain points
eg. Button1, and ud_button1, Button2 and ud_button2...
same with vars... (other than doing differential backups)
??
thx,
Paul
I'm in the process of implementing an undo function, boring....
What i found in the archives is:
[B4X] [class] UndoManager
When i try to analyse the undo manager class,i see a variable "ud as undodata" ; it seems that it accepts states of different objects (text from one, color from another..)
But i have many objects with text, many with different colors, most text and color... that change all the time.
Questions:
1. Do i need a Getstate sub for every object-property combination individually?
Can't i backup a "button" and have all its properties implicitely included (text, color, position...)
2. What is the benefit over declaring a "backup" view/variable and do a copy at certain points
eg. Button1, and ud_button1, Button2 and ud_button2...
same with vars... (other than doing differential backups)
??
thx,
Paul