Solved

Unlimited undo/redo?

Posted on 2000-04-09
11
386 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
Comment Utility
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
Comment Utility
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
Comment Utility
could you post the link again, i believe it's not ok.. thanks!
0
 
LVL 10

Expert Comment

by:Lischke
Comment Utility
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
Comment Utility
mike ,
you have been busy again :o)

pin_plunder,
here another link :

http://sunsite.icm.edu.pl/delphi/ftp/d30free/riched98.zip
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 10

Expert Comment

by:Lischke
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
yeah, everything's ok. I've downloaded it, but couldn't test it right now, so ...
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 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

10 Experts available now in Live!

Get 1:1 Help Now