[squeak-dev] The Trunk: ToolBuilder-MVC-tpr.66.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 19 18:58:53 UTC 2022


tim Rowledge uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-tpr.66.mcz

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

Name: ToolBuilder-MVC-tpr.66
Author: tpr
Time: 19 April 2022, 11:58:53.264123 am
UUID: efa0c036-4d27-45ba-aac6-c9a382567161
Ancestors: ToolBuilder-MVC-mt.65

Add a ToolBuilder ability to show a list of options - typically a small number, maybe with a cancel button etc - as opposed to an arbitrary list of values. This separates it out from the chooseFrom:... protocol

=============== Diff against ToolBuilder-MVC-mt.65 ===============

Item was added:
+ ----- Method: MVCUIManager>>chooseOptionFrom:lines:title: (in category 'ui requests') -----
+ chooseOptionFrom: aList lines: linesArray title: aString
+ 	"Choose an option from the given list. Answer the index of the selected item."
+ 	| menu |
+ 	self
+ 		askForProvidedAnswerTo: aString
+ 		ifSupplied:
+ 			[:answer | 
+ 			(answer = #cancel or: [answer isNil]) ifTrue: [^ 0].
+ 			^ aList indexOf: answer].
+ 	
+ 	menu := PopUpMenu labelArray: aList lines: linesArray.
+ 	^ aString isEmpty
+ 		ifTrue: [menu startUp] 
+ 		ifFalse:[menu startUpWithCaption: aString]!



More information about the Squeak-dev mailing list