The Trunk: 51Deprecated-mt.13.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: 51Deprecated-mt.13.mcz

commits-2
Marcel Taeumel uploaded a new version of 51Deprecated to project The Trunk:
http://source.squeak.org/trunk/51Deprecated-mt.13.mcz

==================== Summary ====================

Name: 51Deprecated-mt.13
Author: mt
Time: 16 November 2015, 10:45:03.027 am
UUID: 9a806e12-d302-4962-af1a-5625eb944b77
Ancestors: 51Deprecated-mt.12

Deprecates old text command history.

=============== Diff against 51Deprecated-mt.12 ===============

Item was added:
+ CommandHistory subclass: #TextMorphCommandHistory
+ instanceVariableNames: 'textMorph'
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: '51Deprecated-Morphic-Text Support'!

Item was added:
+ ----- Method: TextMorphCommandHistory>>redo (in category 'command exec') -----
+ redo
+ ^super redoNextCommand
+ !

Item was added:
+ ----- Method: TextMorphCommandHistory>>rememberCommand: (in category 'command exec') -----
+ rememberCommand: aCommand
+ "Make the supplied command be the 'LastCommand', and mark it 'done'"
+
+ "Before adding the new command, remove any commands after the last #done
+ command, and make that last #done command be lastCommand."
+ self removeUndoneCommands.
+ aCommand phase: #done.
+
+ "If we are building a compound command, just add the new command to that"
+ history addLast: aCommand.
+ lastCommand := aCommand.
+ "Debug dShow: ('Remember: ', commandToUse asString)."
+
+ !

Item was added:
+ ----- Method: TextMorphCommandHistory>>removeUndoneCommands (in category 'command exec') -----
+ removeUndoneCommands
+ "Remove all of the commands at the end of history until the first one that is not marked #undone"
+
+ history reversed do: [ :command |
+ (command phase == #done) ifTrue:[
+ lastCommand := command.
+ ^self
+ ]ifFalse:[
+ history remove: command.
+ ].
+ ].
+
+ "If there were no #done commands on the stack, then get rid of lastCommand"
+ lastCommand := nil.
+ !

Item was added:
+ ----- Method: TextMorphCommandHistory>>undo (in category 'command exec') -----
+ undo
+ ^super undoLastCommand
+
+ !

Item was added:
+ TextEditor subclass: #TextMorphEditor
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: '51Deprecated-Morphic-Text Support'!
+
+ !TextMorphEditor commentStamp: 'dtl 1/21/2012 18:02' prior: 0!
+ This is a stub class to replace the original implementation of a ParagraphEditor for TextMorphs, which has since been replaced by TextEditor. This implementation is retained for the benefit of external packages such as Connectors and FreeType that may have dependencies on TextMorphEditor.
+
+ The comment below is from the class comment of the original TextMorphEditor.
+ -----
+ In the past, BookMorphs had the ability to have each page be on the server as a .sp SqueakPage file.  The index of the book was a .bo file.  In text, Cmd-6 had a LinkTo option that linked to a page by its name, or created a new page of that name.  It assumed the book was on a server with a file per page.  Ted removed that code, and kept a copy on his disk in 'TME-ChngEmphasis.st for .bo .sp'!