Hi, all,
Update 1071bookSaveRevert-sw undertakes to merge and bring out the best features of each of the two disparate schemes formerly in place.
(1) As before, all revertibility is predicated on an explicit prior "save for later revert."
(2) From the user's point of view: when going through a tutorial housed in a BookMorph whose author has earlier done a "save entire book", the user can choose either of the following items from the main Book menu at any point:
[a] revert this page [b] revert entire book.
The single-page revert discards any changes the user may have made to the page, and reverts it the pristine version the author has prepared for it. The "entire-book" revert discards any changes the user may have made anywhere in the book, including page insertions, page deletions, edits on a page, and page-sorting, and restores the original list of pages in the original order.
(3) The normal authoring procedure will be to create the BookMorph, get it into exactly the state you want it to be in when the user first loads it, then choose "save entire book for later revert" from the Book menu. Except in unusual circumstances, this will probably be the final step in publishing a BookMorph-based tutorial.
Any pre-existing BookMorph content can be made "revert-friendly" by loading it, then telling it to "save entire book for later revert," then republishing.
(4) Note that when using the "short form" of the Book control panel, clicking on its menu icon will now bring up a "short form" of the Book Menu, which offers the "revert" commands and a few other things of general interest to non-author users of the book, such as "find." For the more author-like options relating to building the book, switch to the long form of the Book control panel.
(5) Finally, note that the Viewer for a BookMorph now offers tiles for revert-this-page and revert-entire-book, so authors wanting to bring the "revert" feature to the attention of their users can make their own "revert" buttons and position them on their pages.
Cheers,
-- Scott
Scott, Great! Sounds like the idea synthesis of your code and mine.
--Ted.
etoys-dev@lists.squeakfoundation.org