On Friday, September 26, 2014 9:49:59 AM UTC-7, Stephen Kimmel wrote: > > Giving it some more thought, properly considered this routine of replacing > a modified tiddler with a previous version that has been held in a > temporary store might qualify as a feature rather than a bug. In essence > what I did was to undo my changes even though I had saved the changes. > > Has someone suggested an Undo function? >
For TWClassic, I wrote http://www.TiddlyTools.com/#UndoPlugin Basically, it extends the core code for saveTiddler() and deleteTiddler() so that when tiddlers are created, deleted, or updated in the "store", the previous revisions are saved in memory in a 'stack' of tiddlers. The plugin provides an undo button that, when clicked, shows a popup list of tiddler changes that have occurred since the beginning of the session. Invoking undo simply overwrites the current tiddler contents with the previous version from top of the stack, or removes the newly created tiddler, or restores the deleted tiddler. You can also select a change further down the stack, which will undo *all* the changes back to that point, allowing you to reverse several changes at once. There is one area where UndoPlugin could use some improvement: currently, the plugin treats each tiddler change as a separate item that can be undone. However, a single user action can sometimes result in changes to several tiddlers in rapid succession. and undoing these changes should not be presented as separate items in the undo stack. Instead, these changes should logically be grouped together so they can be undone as a single action. This could be accomplished by adding a pair of functions, beginUndoFrame() and endUndoFrame() that could be invoked by other handlers before/after making multiple tiddler changes, which would allow the undo handler to recognize those changes as a single event. Of course, this would require those other handlers to be "undo aware" so that they could call beginUndoFrame/endUndoFrame accordingly. TiddlyTools UndoPlugin is for TWClassic only.. but a similar plugin could definitely be written for TW5 -- though it might be best as TW core functionality. I am currently in the planning stages for deciding which TiddlyTools plugins will be re-written for TW5, so I will add this to the list of candidates. enjoy, -e Eric Shulman TiddlyTools / ELS Design Studios YOUR DONATIONS ARE VERY IMPORTANT! HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... http://TiddlyTools.github.com/fundraising.html#MakeADonation Professional TiddlyWiki Consulting Services... Analysis, Design, and Custom Solutions: http://www.TiddlyTools.com/#Contact -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

