[squeak-dev] The Trunk: Morphic-mt.1804.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Nov 29 17:38:34 UTC 2021


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1804.mcz

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

Name: Morphic-mt.1804
Author: mt
Time: 29 November 2021, 6:38:28.129615 pm
UUID: 7dcadcec-4dd8-4376-b0f0-8e9979c444ff
Ancestors: Morphic-mt.1803

Complements Tools-mt.1079.

=============== Diff against Morphic-mt.1803 ===============

Item was removed:
- ----- Method: PluggableTextMorph>>saveContentsInFile (in category 'menu commands') -----
- saveContentsInFile
- 	self handleEdit: [textMorph editor saveContentsInFile]!

Item was changed:
  ----- Method: PluggableTextMorph>>update: (in category 'updating') -----
  update: aSymbol 
  	aSymbol ifNil: [^self].
  	aSymbol == #flash ifTrue: [^self flash].
  
  	aSymbol == getTextSelector
  		ifTrue: [
  			self setText: self getText.
  			getSelectionSelector
  				ifNotNil: [self setSelection: self getSelection].
  			^ self].
  	aSymbol == getSelectionSelector 
  		ifTrue: [^self setSelection: self getSelection].
  
  	aSymbol == #acceptChanges ifTrue: [^ self accept].
  	aSymbol == #revertChanges ifTrue: [^ self cancel].
  
  	(aSymbol == #autoSelect and: [getSelectionSelector notNil]) 
  		ifTrue: 
  			[self handleEdit: 
  					[(textMorph editor)
  						abandonChangeText; "no replacement!!"
  						setSearch: model autoSelectString;
  						findAgainNow "do not reset search string"]].
  	aSymbol == #clearUserEdits ifTrue: [^self hasUnacceptedEdits: false].
  	aSymbol == #wantToChange 
  		ifTrue: 
  			[self canDiscardEdits ifFalse: [^self promptForCancel].
  			^self].
  	aSymbol == #appendEntry 
  		ifTrue: 
  			[self handleEdit: [self appendEntry].
  			^self refreshWorld].
  	aSymbol == #appendEntryLater
  		ifTrue: [self handleEdit: [self appendEntry]].
  	aSymbol == #clearText 
  		ifTrue: 
  			[self handleEdit: [self changeText: Text new].
  			^self refreshWorld].
  	aSymbol == #bs 
  		ifTrue: 
  			[self handleEdit: [self bsText].
  			^self refreshWorld].
  	aSymbol == #codeChangedElsewhere 
  		ifTrue: 
  			[self hasEditingConflicts: true.
  			^self changed].
  	aSymbol == #saveContents
  		ifTrue:
+ 			[^(self respondsTo: #saveContentsInFile) ifTrue: [self saveContentsInFile]].
- 			[^self saveContentsInFile].
  	aSymbol == #showContents
  		ifTrue:
  			[^ self scrollToTop].
  !

Item was removed:
- ----- Method: TextEditor>>saveContentsInFile (in category 'menu messages') -----
- saveContentsInFile
- 	"Save the receiver's contents string to a file, which usually prompts the user for a file name."
- 
- 	self paragraph text string
- 		ifEmpty: [self inform: 'Nothing to save.']
- 		ifNotEmpty: [:stringToSave |
- 			(self model saveContents: stringToSave accessMode: #create)
- 				ifTrue: [
- 					self flag: #discuss. "mt: Is this correct? Having unaccepted contents means that the model does not know about it. Do we assume that the model will also keep track of the stringToSave?"
- 					self morph hasUnacceptedEdits: false]].!



More information about the Squeak-dev mailing list