Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to make undo and redo action in a table?
Message
De
16/02/2006 19:13:36
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01096632
Message ID:
01096937
Vues:
20
>>>>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.).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform