[Pkg] The Trunk: Morphic-mt.957.mcz

commits at source.squeak.org commits at source.squeak.org
Sat May 2 10:37:00 UTC 2015


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

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

Name: Morphic-mt.957
Author: mt
Time: 2 May 2015, 12:36:22.238 pm
UUID: d62a1d6a-7876-b44b-9d23-71ade2abb0e9
Ancestors: Morphic-mt.956

Allow models to trigger accept/revert changes in pluggable text morphs.

Why? Provides an additional, more general way besides context menus or keyboard shortcuts.

=============== Diff against Morphic-mt.956 ===============

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;
  						againOrSame: true]].
  	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 saveContentsInFile].
+ !
- 			[^self saveContentsInFile]!



More information about the Packages mailing list