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

commits at source.squeak.org commits at source.squeak.org
Thu Oct 5 06:51:03 UTC 2017


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

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

Name: ToolBuilder-Morphic-mt.197
Author: mt
Time: 5 October 2017, 8:50:50.594923 am
UUID: b60282f3-e8d4-4b4d-86e4-74ab5c91f62b
Ancestors: ToolBuilder-Morphic-tpr.196

To avoid confusion with the old "morphic/mvc open" pattern, rename the ToolBuilder-initiated opening for morphs from #morphicOpenWith: to #openAsTool. Drop the argument because that event check for "open window at hand" was really global and the tool builder does not have anything to do with it. Browse #currentEvent if you want to learn more about that.

Note that there is no need to hint about "morphic" in that selector because (1) "ToolBuilder-Morphic" is already a Morphic-specific package and (2) all the implementors are actual morphs.

=============== Diff against ToolBuilder-Morphic-tpr.196 ===============

Item was removed:
- ----- Method: DialogWindow>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
- morphicOpenWith: aMorphicToolBuilder
- 
- 	^ self
- 		moveToHand;
- 		getUserResponse!

Item was added:
+ ----- Method: DialogWindow>>openAsTool (in category '*ToolBuilder-Morphic-opening') -----
+ openAsTool
+ 
+ 	self flag: #fishy. "mt: Why does the dialog not return its Morphic form but data?"
+ 	^ self
+ 		moveToHand;
+ 		getUserResponse!

Item was removed:
- ----- Method: MenuMorph>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
- morphicOpenWith: aMorphicToolBuilder
- 
- 	self popUpInWorld: World.
- 	^ super morphicOpenWith: aMorphicToolBuilder!

Item was added:
+ ----- Method: MenuMorph>>openAsTool (in category '*ToolBuilder-Morphic-opening') -----
+ openAsTool
+ 
+ 	self popUpInWorld: World.!

Item was removed:
- ----- Method: Morph>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
- morphicOpenWith: aMorphicToolBuilder
- 
- 	^ self openInWorld!

Item was added:
+ ----- Method: Morph>>openAsTool (in category '*ToolBuilder-Morphic-opening') -----
+ openAsTool
+ 
+ 	self openInWorld.!

Item was changed:
  ----- Method: MorphicToolBuilder>>open: (in category 'opening') -----
  open: anObject
  	"Build and open the object. Answer the widget opened."
  	
+ 	^ (self build: anObject) openAsTool!
- 	^ (self build: anObject) morphicOpenWith: self!

Item was removed:
- ----- Method: SystemWindow>>morphicOpenWith: (in category '*ToolBuilder-Morphic-opening') -----
- morphicOpenWith: aMorphicToolBuilder
- 
- 	| morph |
- 	morph := self openInWorldExtent: self extent.
- 	(Project uiManager openToolsAttachedToMouseCursor
- 		and: [ | event |
- 			event := aMorphicToolBuilder currentEvent.
- 			event isMouse and: [event isMouseUp]])
- 				ifTrue: [
- 					morph setProperty: #initialDrop toValue: true.
- 					morph hasDropShadow: false.
- 					aMorphicToolBuilder currentHand attachMorph: morph].
- 	^ morph
- !

Item was added:
+ ----- Method: SystemWindow>>openAsTool (in category '*ToolBuilder-Morphic-opening') -----
+ openAsTool
+ 	"Open this window as a tool, that is, honor the preferences such as #reuseWindows and #openToolsAttachedToMouseCursor."
+ 	
+ 	| meOrSimilarWindow |
+ 	meOrSimilarWindow := self openInWorldExtent: self extent.
+ 	(Project uiManager openToolsAttachedToMouseCursor
+ 		and: [ | event |
+ 			event := self currentEvent.
+ 			event isMouse and: [event isMouseUp]])
+ 				ifTrue: [
+ 					meOrSimilarWindow setProperty: #initialDrop toValue: true.
+ 					meOrSimilarWindow hasDropShadow: false.
+ 					self currentHand attachMorph: meOrSimilarWindow].
+ 	^ meOrSimilarWindow
+ !



More information about the Squeak-dev mailing list