[squeak-dev] The Trunk: SMBase-tpr.145.mcz

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


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

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

Name: SMBase-tpr.145
Author: tpr
Time: 19 April 2022, 11:53:52.547043 am
UUID: de3d85aa-40cf-4bb2-8c77-f8aa1fb28ed3
Ancestors: SMBase-pre.144

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 SMBase-pre.144 ===============

Item was changed:
  ----- Method: SMSqueakMap class>>askUser (in category 'changelog replay') -----
  askUser
  	"Ask user about how to handle a replayed installation note
  	when there is no current SqueakMap in the image."
  
  	| choice |
+ 	[choice := Project uiManager
+ 				chooseOptionFrom: #('Yes' 'No' 'More info')
- 	[choice := UIManager default chooseFrom: #('Yes' 'No' 'More info')
  				title:
  'There is no SqueakMap in this image,
  do you wish to create/recreate it? (typical answer is Yes)' .
+ 			choice = 3] whileTrue:
+ 		[self inform:
- 			choice = 3] whileTrue: [self inform:
  'When packages are installed using SqueakMap a little mark is made
  in the change log. When an image is reconstructed from the changelog
  these marks are intended to keep your map informed about what packages
  are installed. You probably already have a map on disk which will automatically be
  reloaded if you choose ''Yes'', otherwise an new empty map will be created.
  If you choose ''No'', it will only result in that SqueakMap will not know that this package
  is installed in your image.
  If you are still unsure - answer ''Yes'' since that is probably the best.'].
  	^choice = 1!

Item was changed:
  ----- Method: SMSqueakMap class>>noteInstalledPackage:version: (in category 'changelog replay') -----
  noteInstalledPackage: uuidString version: version
  	"We are replaying a change that indicates that a package
  	was just installed. If there is a map we let it record this,
  	otherwise we ask the user if we should create/recreate the map."
  
  	| choice |
  	DefaultMap
  		ifNotNil: [DefaultMap noteInstalledPackage: uuidString version: version]
+ 		ifNil: 
+ 			[[choice := Project uiManager
+ 						chooseOptionFrom: #('Yes' 'No' 'More info')
+ 						title:
- 		ifNil: [
- 			[choice := UIManager default chooseFrom: #('Yes' 'No' 'More info')
- 				title:
  'There is no SqueakMap in this image,
  do you wish to create/recreate it? (typical answer is Yes)' .
+ 			choice = 3] whileTrue:
+ 			[self inform:
- 			choice = 3] whileTrue: [self inform:
  'When packages are installed using SqueakMap a little mark is made
  in the change log. When an image is reconstructed from the changelog
  these marks are intended to keep your map informed about what packages
  are installed. You probably already have a map on disk which will automatically be
  reloaded if you choose ''Yes'', otherwise an new empty map will be created.
  If you choose ''No'', it will only result in that SqueakMap will not know that this package
  is installed in your image.
  If you are still unsure - answer ''Yes'' since that is probably the best.'].
+ 			choice = 1 ifTrue:
+ 				[self default noteInstalledPackage: uuidString version: version]]!
- 			choice = 1
- 				ifTrue:[self default noteInstalledPackage: uuidString version: version]]!



More information about the Squeak-dev mailing list