Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make undo and redo action in a table?
Message
 
 
To
16/02/2006 19:13:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01096632
Message ID:
01096938
Views:
22
>>>>>I assume it is necessary to copy to a regular array first.
>>>>
>>>>Because it has to be an object property, not the array.
>>>>
>>>>You can do it like this
>>>>
>>>>scatter name loRecord
>>>>thisform.AddProperty('oRecord',loRecord)
>>>
>>>It works if I SCATTER directly to the form property, but I committed the mistake of defining the property as an array property!
>>>
>>>See message #1096894 for sample code.
>>
>>I was thinking that there could be different functionality and threfore different implementation of Redo/Undo. It could be only for the current field (cell in grid) or for the whole record.
>
>You could try to implement multiple undos as in Word (LIFO). You could keep track of each field as it is modified, maintaining some LIFO queue - but that seems quite complicated. Probably it would involve intercepting the LostFocus() Event in all your base classes (cTextBox, cEditBox, cCheckBox, etc.).

Yes, this would be a complex method to write, but it could be done. Luckily it's not for me <g>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform