Solved

Unlimited undo/redo?

Posted on 2000-04-09
11
408 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 78
Performance of SQL statement 37 137
scroll down TListBox component in Delphi 1 31
How to insert .png images to TClientDataSet .cds file? 2 71
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

749 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