[squeak-dev] The Trunk: Services-Base-mt.71.mcz

commits at source.squeak.org commits at source.squeak.org
Wed Aug 25 12:13:10 UTC 2021

Marcel Taeumel uploaded a new version of Services-Base to project The Trunk:

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

Name: Services-Base-mt.71
Author: mt
Time: 25 August 2021, 2:13:10.495495 pm
UUID: 0ba2fb29-a329-8d44-b2c4-725c06581afc
Ancestors: Services-Base-mt.70

Make "create new service"-service not raise a syntax error when cancelled. Remove it from the method-list menu.

=============== Diff against Services-Base-mt.70 ===============

Item was changed:
  ----- Method: BasicRequestor>>getString (in category 'generic requests') -----
  	| result |
+ 	result := Project uiManager request: caption initialAnswer: answer contents.
- 	result := UIManager default  request:caption  initialAnswer:answer contents.
  	self newCaption.
+ 	result isEmptyOrNil ifTrue: [ServiceCancelled signal].
- 	result isEmpty  |result isNil  ifTrue:[ServiceCancelled signal].
  	^ result!

Item was removed:
- ----- Method: WorldMenuProvider>>browserMethodMenucreateNewService (in category 'saved preferences') -----
- browserMethodMenucreateNewService
- 	^ #(#'Items in browserMethodMenu:' #createNewService 1 )!

Item was changed:
  ----- Method: WorldMenuProvider>>createNewService (in category 'services') -----
  	^ ServiceAction 
  		text: 'Create new service' 
  		button: 'new service' 
  		description: 'Define a new service provided by this package' 
  		action: [:r | | s p |
  			s := r caption: 'enter service identifier'; getSymbol.
+ 			s isEmptyOrNil ifFalse:  [
+ 				p := r getPackageProvider.
+ 				p compile: s, ' 
- 			p := r getPackageProvider.
- 			p compile: s, ' 
  	^ ServiceAction 
  		"Open the service browser to set the menu position and the keyboard shortcut"
  		text: ''fill menu label''
  		button: ''short button text''
  		description: ''longer text for balloon help''
  		action: [:r | "action block"]
  		condition: [:r | "optional condition block"]' classified: 'services'.
+ 			r getBrowser browseReference: (MethodReference class: p selector: s)]]!
- 			r getBrowser browseReference: (MethodReference class: p selector: s)]!

Item was added:
+ (PackageInfo named: 'Services-Base') postscript: '(ServiceRegistry current serviceWithId: #browserMethodMenu) services
+ 	removeAllSuchThat: [:service | service id = #createNewService].'!

More information about the Squeak-dev mailing list