Patrick Rein uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-pre.227.mcz==================== Summary ====================
Name: ToolBuilder-Morphic-pre.227
Author: pre
Time: 30 April 2019, 3:27:02.905906 pm
UUID: cac10ed0-f94c-2446-bbe2-418edc5c9e1a
Ancestors: ToolBuilder-Morphic-pre.226
Makes the ProvideAnswerNotification handling more robust with regard to the input (actual value or index)
=============== Diff against ToolBuilder-Morphic-pre.226 ===============
Item was changed:
----- Method: MorphicUIManager>>chooseFrom:values:lines:title: (in category 'ui requests') -----
chooseFrom: labelList values: valueList lines: linesArray title: aString
"Choose an item from the given list. Answer the selected item."
| index |
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ nil].
+ ^ valueList at: (valueList indexOf: answer) ifAbsent: [
+ answer isNumber
+ ifTrue: [valueList at: answer ifAbsent: [nil]]
+ ifFalse: [nil]]].
- ^ valueList at: (valueList indexOf: answer) ifAbsent: [nil]].
index := self chooseFrom: labelList lines: linesArray title: aString.
^ index = 0
ifTrue: [ nil ]
ifFalse: [ valueList at: index ]!