[squeak-dev] The Trunk: Morphic-nice.1341.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 10 15:51:34 UTC 2017

Nicolas Cellier uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-nice.1341
Author: nice
Time: 10 June 2017, 5:51:03.006817 pm
UUID: c151c809-e1f1-4fd4-92a0-e4911d6960fe
Ancestors: Morphic-eem.1340

Massively replace ifNotNilDo: by ifNotNil:
We don't need two different selectors to do a single thing.

=============== Diff against Morphic-eem.1340 ===============

Item was changed:
  ----- Method: Morph>>dismissMorph (in category 'meta-actions') -----
  	"This is called from an explicit halo destroy/delete action.
  	So first disconnect all constraints to keep the graph up to date."
  	(self respondsTo: #disconnectAllConstraints) "Connectors package"
  		ifTrue: [ self perform: #disconnectAllConstraints ].
  	(self respondsTo: #releaseGraphModels) "CGPrereqs package (Connectors)"
  		ifTrue: [ self perform: #releaseGraphModels ].
+ 	self world ifNotNil: 
- 	self world ifNotNilDo: 
  			[:w |  w abandonAllHalos; stopStepping: self].
  	self delete!

Item was changed:
  ----- Method: SketchMorph>>collapse (in category 'menus') -----
  	"Replace the receiver with a collapsed rendition of itself."
  	|  w collapsedVersion a ht tab |
  	(w := self world) ifNil: [^self].
  	collapsedVersion := (self imageForm scaledToSize: 50 at 50) asMorph.
  	collapsedVersion setProperty: #uncollapsedMorph toValue: self.
  	collapsedVersion on: #mouseUp send: #uncollapseSketch to: collapsedVersion.
  	collapsedVersion setBalloonText: ('A collapsed version of {1}.  Click to open it back up.' translated format: {self externalName}).
  	self delete.
  	w addMorphFront: (
  		a := AlignmentMorph newRow
  			hResizing: #shrinkWrap;
  			vResizing: #shrinkWrap;
  			borderWidth: 4;
  			borderColor: Color white;
  			addMorph: collapsedVersion;
  	a setNameTo: self externalName.
  	ht := (tab := Smalltalk at: #SugarNavTab ifPresent: [:c | ActiveWorld findA: c])
  			[tab height]
  	a position: 0 at ht.
  	collapsedVersion setProperty: #collapsedMorphCarrier toValue: a.
+ 	(self valueOfProperty: #collapsedPosition) ifNotNil:
- 	(self valueOfProperty: #collapsedPosition) ifNotNilDo:
  		[:priorPosition |
  			a position: priorPosition]!

Item was changed:
  ----- Method: SmalltalkEditor>>buttonForIt (in category 'do-its') -----
+ 	^ self doItButtonFromSelection ifNotNil: [:e | e openInHand]!
- 	^ self doItButtonFromSelection ifNotNilDo: [:e | e openInHand]!

More information about the Squeak-dev mailing list