Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Create Undo button
Message
De
15/10/1998 17:33:45
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00146106
Message ID:
00147279
Vues:
32
>Look at InteractiveChange.
>
>Of course, anything you do will have to be done in all controls. Therefore, you'd want to add this functionality to your base control classes. And since this code will be very similar for all classes, you should probably write a Change class that each control class instantiates and delegates to in InteractiveChange.
>
>It's not rocket science, but it's not a five minute job, either. :)

The way to go. We may need an .PrevValues[n] property array in that class, increase its dimension in each InteractiveChange, and step back in Undo - like

This.Value=this.Undo.PrevValues[this.Undo.LastValueIndex-1]

Then we'd have to store the this.Undo.LastValueIndex-1 into some this.Undo.CurrentValueIndex (in case we want a ReDo)... I've used a technique like this in VPasns solitaire for undoing moves, but, well, any .InteractiveChange is just another move by the user, so it should be at least technically compatible, if not completely isomorphous.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform