[squeak-dev] The Trunk: Morphic-mt.2063.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 10:20:16 UTC 2023


Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2063.mcz

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

Name: Morphic-mt.2063
Author: mt
Time: 16 January 2023, 11:20:14.897631 am
UUID: 20e9e869-a9a4-6d42-b90d-90af2bcefe9d
Ancestors: Morphic-tpr.2062

Remove some more variable shadowing

=============== Diff against Morphic-tpr.2062 ===============

Item was changed:
  ----- Method: MVCMenuMorph>>invokeAt:in:allowKeyboard: (in category 'invoking') -----
  invokeAt: aPoint in: aWorld allowKeyboard: aBoolean
  	"Add this menu to the given world centered at the given point. Wait for the user to make a selection and answer it. The selection value returned is an integer in keeping with PopUpMenu, if the menu is converted from an MVC-style menu."
  	"Details: This is invoked synchronously from the caller. In order to keep processing inputs and updating the screen while waiting for the user to respond, this method has its own version of the World's event loop." 
+ 	| w |
- 	| w originalFocusHolder |
  	self flag: #bob.		"is <aPoint> global or local?"
  	self flag: #arNote.	"<aPoint> is local to aWorld"
  	originalFocusHolder := aWorld primaryHand keyboardFocus.
  	self popUpAt: aPoint forHand: aWorld primaryHand in: aWorld allowKeyboard: aBoolean.
  	done := false.
  	w := aWorld outermostWorldMorph. "containing hand"
  	[self isInWorld & done not] whileTrue: [w doOneSubCycle].
  	self delete.
+ 	originalFocusHolder ifNotNil: [
+ 		aWorld primaryHand newKeyboardFocus: originalFocusHolder.
+ 		originalFocusHolder := nil].
- 	originalFocusHolder ifNotNil: [aWorld primaryHand newKeyboardFocus: originalFocusHolder].
  	^ mvcSelection
  !

Item was changed:
  ----- Method: MenuMorph>>invokeModalAt:in:allowKeyboard: (in category 'modal control') -----
  invokeModalAt: aPoint in: aWorld allowKeyboard: aBoolean
  	"Invoke this menu and don't return until the user has chosen a value.
  	See senders of this method for finding out how to use modal menu morphs."
+ 	| w |
- 	| w originalFocusHolder |
  	originalFocusHolder := aWorld primaryHand keyboardFocus.
  	self popUpAt: aPoint forHand: aWorld primaryHand in: aWorld allowKeyboard: aBoolean.
  	self isModalInvokationDone: false.
  	w := aWorld outermostWorldMorph. "containing hand"
  	[self isInWorld & self isModalInvokationDone not] whileTrue: [w doOneSubCycle].
  	self delete.
+ 	originalFocusHolder ifNotNil: [
+ 		aWorld primaryHand newKeyboardFocus: originalFocusHolder.
+ 		originalFocusHolder := nil].
- 	originalFocusHolder ifNotNil: [aWorld primaryHand newKeyboardFocus: originalFocusHolder].
  	^ self modalSelection!



More information about the Squeak-dev mailing list