[squeak-dev] The Trunk: EToys-mt.468.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Mar 14 15:51:00 UTC 2022
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.468.mcz
==================== Summary ====================
Name: EToys-mt.468
Author: mt
Time: 14 March 2022, 4:50:52.055676 pm
UUID: ef58ceb2-ad50-0f4e-844a-15ffc31b9e11
Ancestors: EToys-mt.467
Removes a few false uses of #asText sent to TextMorph where #text was meant, that is, "accessing" not "converting".
=============== Diff against EToys-mt.467 ===============
Item was changed:
----- Method: FunctionComponent>>accept (in category 'menu commands') -----
accept
"Inform the model of text to be accepted, and return true if OK."
| textToAccept oldSelector |
oldSelector := functionSelector.
+ textToAccept := textMorph text.
- textToAccept := textMorph asText.
textToAccept = self getText ifTrue: [^ self]. "No body to compile yet"
functionSelector := model class
compile: self headerString , textToAccept asString
classified: 'functions' notifying: nil.
self setText: textToAccept.
self hasUnacceptedEdits: false.
oldSelector ifNotNil:
[functionSelector = oldSelector ifFalse: [model class removeSelector: oldSelector]].
self fire!
Item was changed:
----- Method: FunctionComponent>>addPin (in category 'as yet unclassified') -----
addPin
| i prev sideLength wasNew |
+ wasNew := self getText = textMorph text.
- wasNew := self getText = textMorph asText.
i := pinSpecs size.
prev := pinSpecs last.
sideLength := prev pinLoc asInteger odd ifTrue: [self height] ifFalse: [self width].
pinSpecs := pinSpecs copyWith:
(PinSpec new pinName: ('abcdefghi' copyFrom: i to: i) direction: #input
localReadSelector: nil localWriteSelector: nil
modelReadSelector: nil modelWriteSelector: nil
defaultValue: nil pinLoc: prev pinLoc + (8/sideLength) asFloat \\ 4).
self initFromPinSpecs.
self addPinFromSpec: pinSpecs last.
wasNew ifTrue: [self setText: self getText].
self accept
!
Item was changed:
----- Method: PluggableTextMorph>>appendTextEtoy: (in category '*Etoys-transcript') -----
appendTextEtoy: moreText
"Append the text in the model's writeStream to the editable text. "
self handleEdit: [
self
+ selectInvisiblyFrom: textMorph text size + 1 to: textMorph text size;
- selectInvisiblyFrom: textMorph asText size + 1 to: textMorph asText size;
replaceSelectionWith: moreText;
+ selectFrom: textMorph text size + 1 to: textMorph text size;
- selectFrom: textMorph asText size + 1 to: textMorph asText size;
hasUnacceptedEdits: false;
scrollSelectionIntoView;
changed
]!
Item was changed:
----- Method: PrintComponent>>accept (in category 'menu commands') -----
accept
"Inform the model of text to be accepted, and return true if OK."
| textToAccept |
self canDiscardEdits ifTrue: [^self flash].
setTextSelector isNil ifTrue: [^self].
+ textToAccept := textMorph text.
- textToAccept := textMorph asText.
model perform: setTextSelector
with: (Compiler evaluate: textToAccept logged: false).
self setText: textToAccept.
self hasUnacceptedEdits: false!
More information about the Squeak-dev
mailing list
|