[squeak-dev] The Trunk: SUnitGUI-tpr.90.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 19 18:55:56 UTC 2022


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

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

Name: SUnitGUI-tpr.90
Author: tpr
Time: 19 April 2022, 11:55:55.731885 am
UUID: 68f5de29-fc40-4db6-94af-137cdb7c5b09
Ancestors: SUnitGUI-mt.89

Use the new 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.
Also update "UIManager default" with "Project uiManager"

=============== Diff against SUnitGUI-mt.89 ===============

Item was changed:
  ----- Method: TestRunner>>showHistoryMenu (in category 'history saving') -----
  showHistoryMenu
  	| selectionIndex selectedPreviousResult actionIndex |
+ 	selectionIndex := Project uiManager
+ 						chooseFrom: self historyMenuList
+ 						title: 'History:'.
- 	selectionIndex := UIManager default chooseFrom: self historyMenuList title: 'History:'.
- 
  	"We pressed outside the menu"
+ 	selectionIndex isZero ifTrue: [^ self ]. 				
- 	selectionIndex isZero ifTrue: [ ^ self ]. 				
  
  	"save current result is selected"
+ 	selectionIndex = 1 ifTrue:
+ 		[self previousRun addFirst: result. ^ self ]. 			
- 	selectionIndex = 1 ifTrue: [ self previousRun addFirst: result. ^ self ]. 			
  
  	selectedPreviousResult := self previousRun at: (selectionIndex - 1).
+  	actionIndex := Project uiManager
+ 						chooseOptionFrom: #('delete' 'show diff')
+ 						title:  'Action:'.
+ 	actionIndex = 1 ifTrue:
+ 		[ self previousRun remove: selectedPreviousResult. ^ self ].
+ 	actionIndex = 2 ifTrue:
+ 		[ self showDiffWith: selectedPreviousResult].	!
-  	actionIndex := (UIManager default chooseFrom: #('delete' 'show diff')  title:  'Action:').
- 	actionIndex = 1 ifTrue: [ self previousRun remove: selectedPreviousResult. ^ self ].
- 	actionIndex = 2 ifTrue: [ self showDiffWith: selectedPreviousResult].	!



More information about the Squeak-dev mailing list