Cut/Paste Commands

J

Jason Cavett

If I want to setup an application that I am developnig so cut and paste
are able to part of undo/redo, do I need to implement them on my own
within my Command pattern (even though they are already handled by
default) or is there some easier way to do this?


Thanks
 
O

Oliver Wong

Jason Cavett said:
If I want to setup an application that I am developnig so cut and paste
are able to part of undo/redo, do I need to implement them on my own
within my Command pattern (even though they are already handled by
default) or is there some easier way to do this?

When a cut or paste happens, to support undo/redo via the command
pattern, you would only need to store where the cursor was, and what the
contents of the clipboard were at the time the command was issued. So you
could use the existing implementation of cut and paste assuming you can add
hooks to immediately scan the clipboard and cursor position when those
commands are invoked.

- Oliver
 
J

Jason Cavett

pattern, you would only need to store where the cursor was, and what the
contents of the clipboard were at the time the command was issued. So you
could use the existing implementation of cut and paste assuming you can add
hooks to immediately scan the clipboard and cursor position when those
commands are invoked.

- Oliver

Okay, I'll give that a shot. Thanks Oliver.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,742
Latest member
AshliMayer

Latest Threads

Top