I've looked at this and I'm still not sure how to handle snapshots navigation in an "intuitive" way.
Actually how it works (assume an initial state S0): - when you create a new snapshot (TWMWorldRecorder>>snapshot) the new snapshot is on top, this one is OK. Let's call it snapshot S1 - now go back / left arrow (TWMWorldRecorder>>backward) *without moving any window*, easy we go to S0. Go forward, we're at S1. - now move a window and go back. As I don't want to loose the current state, an automatic snapshot (S2) is created so we can go back to current state later. This behavior is not intuitive I think (do two things) but often I forgot to do the snapshot before going backward.... so with this done automatically nothing is lost. (winner-mode in Emacs has this behavior). - go to S3. Then move some windows and delete. If automatically TWM restore last snapshot, we loose current state..... At least, automatic restore on delete is easy: TWMWorldRecorder >>deleteCurrentSnapshot (self snapshots size = 1) not ifTrue: [ self snapshots remove: self currentSnapshot. self currentPosition: self currentPosition - 1. self restoreCurrentSnapshot. "<--- add this line" ] Experimentations still neeeded...... Another idea is to have TWMWorldRecorder plugged to announcements so each time a window move / appear / disappear it creates automatically a snapshot.... Cheers, Laurent On Thu, Dec 29, 2011 at 4:57 PM, Sean P. DeNigris <[email protected]>wrote: > Snapshots are cool! > > But try this: > 1. create two snapshots > 2. navigate to the last one > 3. delete it > > Although it is shown removed from the list (i.e. "1/1"), you are not > automatically navigated back to the first one. You stay on the deleted one, > and when you navigate back to the first with the arrow, the deleted one > reappears in the list (i.e. "1/2") > > Sean > > -- > View this message in context: > http://forum.world.st/TWM-bug-when-deleting-a-snapshot-tp4243197p4243197.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > >
