Solved

Unlimited undo/redo?

Posted on 2000-04-09
11
403 Views
Last Modified: 2010-04-04
I need source code, explaining who can i add unlimiited undo/redo functionality to my program. I'm using TRichEdit.

Thanks.

0
Comment
Question by:pin_plunder
  • 3
  • 3
  • 2
  • +2
11 Comments
 
LVL 1

Expert Comment

by:Edo082297
ID: 2698222
Hello

Check out the Command design pattern in _Design Patterns_ by Richard Gamma et al (the 'Gang of Four', or GOF).

The concept is that you want to encapsulate user actions as objects and push them onto a stack. Undoing an action involves reversing the operation (obviously) and keeping a current index on the stack.

Have fun

Edo
0
 
LVL 17

Expert Comment

by:inthe
ID: 2698252
HI,
i think you will be wanting this because as you may know delphis standard trichedit only has one level of undo whereas richedit2 has multiple undo/redo:

ftp://ftp.cdrom.com/pub/delphi_www/ftp/d30free/riched98.zip

Rich edit control with extended capabilities. Extra formatting properties (highlight, indices, line spacing and so on), URL detection, multilevel undo/redo, support for Unicode strings. Requires RICHED20.DLL


0
 

Author Comment

by:pin_plunder
ID: 2699039
could you post the link again, i believe it's not ok.. thanks!
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 10

Expert Comment

by:Lischke
ID: 2699414
Hi pin_plunder,

what about a real implemetation? Download my Unicode edit control from www.lischke-online.de/Unicode.html. There I have implemented unlimited undo/redo and you can ask me here if you have problems.

Ciao, Mike
0
 
LVL 17

Accepted Solution

by:
inthe earned 40 total points
ID: 2701173
mike ,
you have been busy again :o)

pin_plunder,
here another link :

http://sunsite.icm.edu.pl/delphi/ftp/d30free/riched98.zip
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2701695
I can tell you Barry :-)... in particular with my new E-E sponsored scanner I got today. There's no driver for W2K for this thing. Unbelievable...

Sorry for being off topic.

Ciao, Mike
0
 
LVL 17

Expert Comment

by:inthe
ID: 2702387
How typical for a free gift ,
maybe idea to tell customer services maybe they can send a different one ..
nevermind ..the visor cant do much also as its only "solo" version,theres no link to pc or internet :o(

0
 
LVL 3

Expert Comment

by:darinw
ID: 2702625
Mike & inthe:

Another Expert has already posted a question in CS about the Scanner being Win98 only :(

I apologize for the limitations of the free gift we sent you. I have forwarded the concerns that the other Expert had, which were very well communicated, to the rest of the staff. As I told him/her, it may not make a difference: flexible often means expensive.

Let me see if I can find the link to the other question. You guys can post there your comments there if you'd like.

darinw
Customer Service
0
 
LVL 3

Expert Comment

by:darinw
ID: 2702629
Got it:

http://www.experts-exchange.com/jsp/qShow.jsp?ta=commspt&qid=10324707 

Sorry for the off-topic posts pin_plunder.

darinw
Customer Service
0
 
LVL 10

Expert Comment

by:Lischke
ID: 2703225
Thank you darinw, I did the same like Pino (actually I still have installed a Win98 partition for test reasons, as Pino said, most experts are developer...).

pin_plunder, sorry again for that off-topic stuff. How did you came forward with the undo/redo stuff? Have you downloaded my Unicode edit control? Do you need more help?


Ciao, Mike
0
 

Author Comment

by:pin_plunder
ID: 2706211
yeah, everything's ok. I've downloaded it, but couldn't test it right now, so ...
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question