Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create Undo button
Message
From
15/10/1998 17:33:45
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00146106
Message ID:
00147279
Views:
31
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform