[squeak-dev] The Inbox: Morphic-ct.1637.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Mar 2 11:19:11 UTC 2020


Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.1637.mcz

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

Name: Morphic-ct.1637
Author: ct
Time: 2 March 2020, 12:19:01.131949 pm
UUID: 57a82568-af03-4e4b-890d-e13a005ac33a
Ancestors: Morphic-mt.1631

Fixes MorphicHierarchy, which was broken because #world is nil before opening the list in the world.

Second approach: Don't use #currentWorld, simply let RealEstateAgent do the job. This is the same way ObjectsTool goes. Replaces Morphic-ct.1633.

The rest of the diff addresses "" VERY "" strange formattings only ...

=============== Diff against Morphic-mt.1631 ===============

Item was changed:
  ----- Method: MorphHierarchy class>>openOrDelete (in category 'opening') -----
  openOrDelete
+ 
  	| oldMorph |
  	oldMorph := Project current world submorphs
+ 		detect: [:each | each hasProperty: #morphHierarchy]
+ 		ifNone: [
+ 			| newMorph | 
+ 			newMorph := self new asMorph.
+ 			newMorph bottomLeft: ActiveHand position.
+ 			newMorph openInWorld.
+ 			newMorph isFullOnScreen
+ 				ifFalse: [newMorph goHome].
+ 			^ self].
+ 	
- 				detect: [:each | each hasProperty: #morphHierarchy]
- 				ifNone: [| newMorph | 
- 					newMorph := self new asMorph.
- 					newMorph bottomLeft: ActiveHand position.
- 					newMorph openInWorld.
- 					newMorph isFullOnScreen
- 						ifFalse: [newMorph goHome].
- 					^ self].
- 	""
  	oldMorph delete!

Item was changed:
  ----- Method: MorphHierarchy>>asMorph (in category 'private') -----
  asMorph
  	"Answer the morph version of the receiver"
+ 	
  	| morph |
  	morph := MorphHierarchyListMorph
+ 		on: self
+ 		list: #roots
+ 		selected: nil
+ 		changeSelected: #selected:.
- 				on: self
- 				list: #roots
- 				selected: nil
- 				changeSelected: #selected:.
- 	""
  	^ morph inAContainer!

Item was changed:
  ----- Method: MorphHierarchyListMorph>>createContainer (in category 'private') -----
  createContainer
  	"Private - Create a container"
+ 
  	| container |
  	container := BorderedMorph new.
+ 	container extent: RealEstateAgent standardSize.
- 	container extent: (self world extent * (1 / 4 @ (2 / 3))) rounded.
  	container layoutPolicy: TableLayout new.
  	container hResizing: #rigid.
  	container vResizing: #rigid.
  	container
  		color: (Color gray: 0.9);
  		borderWidth: 1;
  		borderColor: Color gray.
  	container layoutInset: 0.
  	"container useRoundedCorners."
+ 	
- 	""
  	container setProperty: #morphHierarchy toValue: true.
  	container setNameTo: 'Objects Hierarchy' translated.
+ 	
- 	""
  	^ container!

Item was changed:
  ----- Method: MorphHierarchyListMorph>>inAContainer (in category 'private') -----
  inAContainer
  	"Answer the receiver contained in a proper container"
+ 
  	| container |
  	container := self createContainer.
  	container addMorphBack: self.
+ 	
+ 	"nasty hack to force the scroolbar recreation"
- 	" 
- 	nasty hack to force the scroolbar recreation"
  	self extent: container extent - container borderWidth.
+ 	
- 	""
  	^ container!

Item was changed:
  ----- Method: MorphHierarchyListMorph>>on:list:selected:changeSelected:menu:keystroke: (in category 'initialization') -----
+ on: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel
+ 
- on: anObject list: getListSel selected: getSelectionSel changeSelected: setSelectionSel menu: getMenuSel keystroke: keyActionSel 
  	super
  		on: anObject
  		list: getListSel
  		selected: getSelectionSel
  		changeSelected: setSelectionSel
  		menu: getMenuSel
  		keystroke: keyActionSel.
+ 	self
+ 		borderWidth: 0;
+ 		autoDeselect: false;
+ 		enableDrag: false;
+ 		enableDrop: true;
+ 		hResizing: #spaceFill;
+ 		vResizing: #spaceFill.
+ 	self expandRoots.!
- 	""
- 	self borderWidth: 0.
- 	self autoDeselect: false.
- 	self enableDrag: false.
- 	self enableDrop: true.
- 	self hResizing: #spaceFill.
- 	self vResizing: #spaceFill.
- self expandRoots!

Item was changed:
  ----- Method: MorphHierarchyListMorph>>setSelectedMorph: (in category 'selection') -----
+ setSelectedMorph: aMorph
+ 
- setSelectedMorph: aMorph 
  	super setSelectedMorph: aMorph.
+ 	self owner isNil ifFalse: [self owner delete].!
- self owner isNil ifFalse:[self owner delete]!



More information about the Squeak-dev mailing list