Re: [pygtk] Undo and Redo

2005-09-19 Thread Christian Robottom Reis
On Sun, Sep 04, 2005 at 09:51:11AM +0200, N. Volbers wrote: > def my_function(arg1, arg2, undolist=[]): Have you checked to be sure that the default list argument is indeed safe? This is usually very error-prone, because the list is created and associated with the class, not the instance. Or is th

Re: [pygtk] Undo and Redo

2005-09-04 Thread David M. Cook
On Sun, Sep 04, 2005 at 09:51:11AM +0200, N. Volbers wrote: > Look at "Documentation" and then at the "Developer's Guide". This is a > very nice introduction to an undo mechanism that basically works like > this: If you call an undoable function, then it must return an > undo-tuple which contain

Re: [pygtk] Undo and Redo

2005-09-04 Thread Toon Verstraelen
3. Yet another approach is used by gazpacho (google for link), where for every action there is a wrapper with a do and an undo function. I have tried this approach for a molecular editing tool and it worked very well. Later on I've switched to a similar (but more complex) mechanism that was ev

Re: [pygtk] Undo and Redo

2005-09-04 Thread Jens Geiregat
On 9/4/05, Brett Viren <[EMAIL PROTECTED]> wrote: > Hi Jens, > > Jens Geiregat <[EMAIL PROTECTED]> writes: > > > I would like to add undo and redo buttons to my program. The problem > > is I do not have any idea how to implement the undo and redo-actions. > > Are there some (easy) examples on thi

Re: [pygtk] Undo and Redo

2005-09-04 Thread N. Volbers
Jens Geiregat schrieb: Hi, I would like to add undo and redo buttons to my program. The problem is I do not have any idea how to implement the undo and redo-actions. Are there some (easy) examples on this subject? Or other (small) pygtk-programs that support undo and redo? Hello Jens, you

Re: [pygtk] Undo and Redo

2005-09-03 Thread Brett Viren
Hi Jens, Jens Geiregat <[EMAIL PROTECTED]> writes: > I would like to add undo and redo buttons to my program. The problem > is I do not have any idea how to implement the undo and redo-actions. > Are there some (easy) examples on this subject? Or other (small) > pygtk-programs that support undo a

[pygtk] Undo and Redo

2005-09-03 Thread Jens Geiregat
Hi, I would like to add undo and redo buttons to my program. The problem is I do not have any idea how to implement the undo and redo-actions. Are there some (easy) examples on this subject? Or other (small) pygtk-programs that support undo and redo? thx, Jens Geiregat _