[squeak-dev] The Trunk: ToolBuilder-MVC-pre.55.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 30 13:26:25 UTC 2019


Patrick Rein uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-pre.55.mcz

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

Name: ToolBuilder-MVC-pre.55
Author: pre
Time: 30 April 2019, 3:26:24.726906 pm
UUID: 378599a0-73a3-c84b-b02d-a96fd5352da1
Ancestors: ToolBuilder-MVC-pre.54

Makes the ProvideAnswerNotification handling more robust with regard to the input (actual value or index)

=============== Diff against ToolBuilder-MVC-pre.54 ===============

Item was changed:
  ----- Method: MVCUIManager>>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."
  	| menu |
  	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)].
  	
  	menu := SelectionMenu labels: labelList lines: linesArray selections: valueList.
  	^ aString 
  		ifEmpty: [menu startUp] 
  		ifNotEmpty: [menu startUpWithCaption: aString]!



More information about the Squeak-dev mailing list