[squeak-dev] The Trunk: Graphics-tpr.510.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 19 18:42:15 UTC 2022


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

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

Name: Graphics-tpr.510
Author: tpr
Time: 19 April 2022, 11:42:09.240875 am
UUID: cb2b30be-839c-458b-9512-5966666d604e
Ancestors: Graphics-mt.509

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 Graphics-mt.509 ===============

Item was changed:
  ----- Method: StrikeFont class>>hostFontFromUser (in category 'font creation') -----
  hostFontFromUser
  	"StrikeFont hostFontFromUser"
  	| fontNames index labels |
  	fontNames := self listFontNames sort.
  	labels := WriteStream on: (String new: 100).
+ 	fontNames
+ 		do:
+ 			[:fn|
+ 			labels nextPutAll: fn]
+ 		separatedBy:[labels cr].
+ 	index := (Project uiManager
+ 				chooseOptionFrom: (labels contents substrings) 
- 	fontNames do:[:fn| labels nextPutAll: fn] separatedBy:[labels cr].
- 	index := (UIManager default chooseFrom: (labels contents substrings) 
  				title: 'Choose your font').
  	index = 0 ifTrue:[^nil].
  	^fontNames at: index!



More information about the Squeak-dev mailing list