Solved

Unlimited undo/redo?

Posted on 2000-04-09
11
393 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
 
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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to disable drag and drop of columns in a TVirtualStringTree 3 72
IExtractImage Delphi 14 201
Delphi: how to implement a User Shortcut mapper? 1 94
Help on project with Soap 10 48
The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now