News:

Zatikon is back and free to play! https://www.chroniclogic.com/zatikon.htm

Main Menu

Undo function

Started by Phonyboy, October 28, 2001, 12:40:29 AM

Previous topic - Next topic

beaujob

Since CL's got a way to store the last step, then all they need to do is make a dropout stack of that data structure.  It's very easy.  Just have a static array, and pretend it's a ring, then keep a pointer to the most recent step.  As you undo/redo, you can move the pointer backwards and forwards.  You also keep a pointer to the tail so you know when you've gotten to the bottom of possible undoing.  This is something they teach every sophomore CS student.  (like me last year.)  :P
"And once again, the day is saved thanks to the Powerpuff Girls."

Phonyboy

I could need an Undo button.... really! You too?

baggio

Quote: from beaujob on 7:40 pm on Oct. 27, 2001
... Just have a static array, and pretend it's a ring, then keep a pointer to the most recent step.  As you undo/redo, you can move the pointer backwards and forwards....Sounds a lot like a circular queue ;)This is something they teach every sophomore CS student.  (like me last year.)  :PThey also keep teaching it to 5th year EET seniors like me.  Not so much that they keep reteaching it, but we keep using it in our projects.
beaujob: I wouldn't mind doing kung-fu in the shadow of a bridge that I built while death and a clown get it on in the bathtub next door, but that's a long ways off.

Micha

yeah, great idea, would love to see it implemented

There is one, I've used it many times. Over on the right, above 'Clear'.

:-)

(Edited by Chillum at 3:16 pm on Oct. 16, 2001)


Andy24

I hate it when I need to keep changing forward and backwards to delete things. it would be nice if I could just use the undo.

Phonyboy

drats... I guess I shouldn´t have started to post here before actually checking out the full version which I downloaded some minutes ago ;-)

Entroper

It's not really a queue, since the order you take things out is like a stack.  It's basically a stack that overwrites the bottom elements after a certain number of elements are in it.  http://www.pontifex2.com/iB_html/non-cgi/emoticons/smile.gif" border="0" valign="absmiddle" alt=':)'>  I think it would be pretty cool to have multiple undo layers.
Entroper
Programmer, Serious Fortress Team
http://www.seriousfortress.com

pasqualz

Hey no problem, we all have had one time when the answer is staring us in the face and we don't see it ;-)
"Call Mr. Plow That's my name, That name again is Mr. Plow" - Homer (Mr. Plow) Simpson

beaujob

Though, it's good that he mentions the Undo button.  I would like to see a deeper undo stack.  Perhaps keep track of the last 10-20 operations?  Sometimes you make two mistakes in a row before you realize that the first mistake even happened.
"And once again, the day is saved thanks to the Powerpuff Girls."

pulsejet5

multiple undo buttons is a great idea but it would also be useful to have a redo button

Both would definately help, and should be easy enough to implement I would've thought.