justin = { main feed , music , code , askjf , pubkey };
Ask Justin Frankel
No reasonable question unanswered since 2009!

Suggested topics: programming, music, sleep, coffee, etc.

Note: please do not ask questions about REAPER features, bugs or scheduling, use the forums instead.


Name: Ask: Human (enter yes):
[back to index] | [unreplied] | [replied] | [recent comments] | [all]

Question: Any general tips on implementing undo in an application? (something I'm struggling with)
Asked by schmoe (96.55.149.x) on September 22 2010, 5:15pm
Reply on September 22 2010, 10:38pm:
    Well, generally, I would make it so your application can serialize its state (either as text, binary data in memory, or file, etc). Once that is supported (presumably load/save of file would use this), you could also use it for undo/redo, keeping a list of states and creating new state points on user actions.

    If you want to optimize memory use, you could also reduce duplicate blocks of memory, of course this adds complexity and possibility of mistakes being made.

Comment:
    Your Name:   -- Site Owner's Name:  (for human-verification)

    Comment:    

    
  
[back to index] | [unreplied] | [replied] | [recent comments] | [all]
Copyright 2025 Justin Frankel. | RSS