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

commits at source.squeak.org commits at source.squeak.org
Mon Mar 14 16:02:50 UTC 2022


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

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

Name: Morphic-mt.1937
Author: mt
Time: 14 March 2022, 5:02:43.157676 pm
UUID: 7a00853b-974d-1743-a6f8-b05e98db10ec
Ancestors: Morphic-mt.1936

Complements EToys-mt.468. Documents the plan for TextMorph >> #asText.

=============== Diff against Morphic-mt.1936 ===============

Item was changed:
  ----- Method: AcceptableCleanTextMorph>>accept (in category 'menu commands') -----
  accept
  	"Overridden to allow accept of clean text"
  
  	| textToAccept ok |
+ 	textToAccept := textMorph text.
- 	textToAccept := textMorph asText.
  	ok := setTextSelector isNil or: 
  					[setTextSelector numArgs = 2 
  						ifTrue: 
  							[model 
  								perform: setTextSelector
  								with: textToAccept
  								with: self]
  						ifFalse: [model perform: setTextSelector with: textToAccept]].
  	ok 
  		ifTrue: 
  			[self setText: self getText.
  			self hasUnacceptedEdits: false]!

Item was changed:
  ----- Method: PluggableTextMorph>>appendEntry (in category 'transcript') -----
  appendEntry
  	"Append the text in the model's writeStream to the editable text. "
+ 	textMorph text size > model characterLimit ifTrue:
- 	textMorph asText size > model characterLimit ifTrue:
  		["Knock off first half of text"
+ 		self selectInvisiblyFrom: 1 to: textMorph text size // 2.
- 		self selectInvisiblyFrom: 1 to: textMorph asText size // 2.
  		self replaceSelectionWith: Text new].
+ 	self selectInvisiblyFrom: textMorph text size + 1 to: textMorph text size.
- 	self selectInvisiblyFrom: textMorph asText size + 1 to: textMorph asText size.
  	self replaceSelectionWith: model contents asText.
+ 	self selectInvisiblyFrom: textMorph text size + 1 to: textMorph text size!
- 	self selectInvisiblyFrom: textMorph asText size + 1 to: textMorph asText size!

Item was changed:
+ ----- Method: TextMorph>>asText (in category 'converting') -----
- ----- Method: TextMorph>>asText (in category 'accessing') -----
  asText
+ 	
+ 	self flag: #todo. "mt: There are too many strange places were #asText is called but #text actually be accessed. Maybe change this after the release of Squeak 6.0."
+ 	^ text
+ 	
+ "Answer the receiver's text composed in a paragraph with additional line breaks. Use #text if you want to retain the original text layout."
+ 	
+ 	"^ self paragraph asTextWithLineBreaks"!
- 	^ text!



More information about the Squeak-dev mailing list