Here are a couple of ideas.
If you want to just undo changes to an entire record you can use tablebuffering and then issue a TableRevert() to undo changes to the record or table.
Another option would be to add a property to all your base classes that can be used for data entry\editing. Use this property to store the original value of the control (you could do this in the GotFocus event). You can then have an Undo method in each control that sets it's value back to the value stored in that property.
Another option may be to keep a log of changes as they are being made. You could capture the control and original value. Then you could have a method that starts with the most recent change and restores them on a last in first out basis.
HTH.
>I am using VFP6.0 for my project.
>In that I want to write a Undo Function as a Class. So, that
>I can call it anywhere in my project.
>How should I write this particular class ? ? ?
>
>Any idea ? ? /
>
>Thanx in advance
>
>Amol.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only