Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Design and Architecture
  4. how to implement undo functionn by using both Command and Memento design pattern

how to implement undo functionn by using both Command and Memento design pattern

Scheduled Pinned Locked Moved Design and Architecture
designregexarchitecturetutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    largs
    wrote on last edited by
    #1

    Hello guys, i'd like to implement the undo and redo function(like Undo and Redo in MS Word) by combination Command and Memento design pattern. I've found a quite useful article about this but it did not mention Memento.Can anyone tell me how to combine these two design pattern?I've also searched around but these articles are either about Command or Memento not both of them. Thank you

    P 1 Reply Last reply
    0
    • L largs

      Hello guys, i'd like to implement the undo and redo function(like Undo and Redo in MS Word) by combination Command and Memento design pattern. I've found a quite useful article about this but it did not mention Memento.Can anyone tell me how to combine these two design pattern?I've also searched around but these articles are either about Command or Memento not both of them. Thank you

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      It's not common to combine the two patterns to perform Undo/Redo. I would suppose that you would need to identify against each action whether or not it was specified with a Memento or a Command. This is not a good design.

      Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups