[lazarus] Form editing: Undo/Redo

Mattias Gaertner nc-gaertnma at netcologne.de
Thu Jun 20 09:31:13 EDT 2002


On Thu, 20 Jun 2002 12:35:30 +0200
Florian Klaempfl <Florian.Klaempfl at gmx.de> wrote:

> At 00:01 20.06.2002 +0200, you wrote:
> >Hi all,
> >
> >I want to implement Undo/Redo for the form editing, but I'm not sure how 
> >this should be done.
> >Normally an undolist just keeps tracks of the changes. But for example 
> >moving a control can result in changing other controls and many other 
> >things. So, for a correct undo, one have to stream the form after every 
> >move/resize/add/delete/change property operation. Or is there a better way?
> 
> Hmmm, the stream seems to be a little bit inefficient :) but it should give 
> a very good result
> (not very "error prone") and it should be easy to implement. So why not?

You already answered: inefficient.
Forms can contain images and I want undo/redo for at least 10 open forms and 100 steps and, as Martyn mentioned, for almost all kinds of form editing, not just like Delphi. 
The needed memory should be reduced by saving only the diffs between the streams. Does anybody know a unit for diffing/patching?


Mattias






More information about the Lazarus mailing list