[squeak-dev] The Trunk: EToys-tpr.490.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jan 16 00:30:46 UTC 2023


tim Rowledge uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tpr.490.mcz

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

Name: EToys-tpr.490
Author: tpr
Time: 15 January 2023, 4:30:36.38666 pm
UUID: 92983de6-a325-453a-8080-161d2f8713fd
Ancestors: EToys-mt.489

Remove some variable shadowing

=============== Diff against EToys-mt.489 ===============

Item was changed:
  ----- Method: HtmlEntityInspector>>fieldHtml (in category 'fields') -----
  fieldHtml
  
  	^ (self newFieldForType: #custom key: #html)
  		name: 'asHtml'; emphasizeName;
+ 		valueGetter: [:obj | obj asHtml];
- 		valueGetter: [:object | object asHtml];
  		yourself!

Item was changed:
  ----- Method: Project class>>cleanUpEtoysGarbage (in category '*Etoys-Squeakland-utilities') -----
  cleanUpEtoysGarbage
  	"Project cleanUpEtoysGarbage"
  	"All these should eventuall go away and be fixed, but for now we have this here."
  	Smalltalk garbageCollect.
  	"Clear weak message sends to remove modal windows from worlds that are closing."
+ 	WeakMessageSend allInstances
+ 		select: [:wm| (wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]
+ 		thenDo:
+ 			[:wm | wm receiver: nil].
- 	(WeakMessageSend allInstances select: [:wm  |
- 		(wm receiver isKindOf: PasteUpMorph) and: [wm selector = #removeModalWindow]]) do: [:wm | wm receiver: nil].
  	"Clear the weak dictionary on the class side that keeps node state around in the rewriter"
  	KedamaEvaluatorNodeState initialize.
  	"Clear the KedamaEvaluator that holds on to the last Kedama world"
  	ScriptEditorMorph setDefaultEvaluator.
  	"Clear the hard references to player classes, "
+ 	(Smalltalk organization listAtCategoryNamed:  'UserObjects') do:
+ 		[:clsname |
+ 		Smalltalk forgetClass: (Smalltalk classNamed: clsname) logged: false].
- 	(Smalltalk organization listAtCategoryNamed:  'UserObjects') do: [:name |
- 	    Smalltalk forgetClass: (Smalltalk classNamed: name) logged: false].
  	Player withAllSubclasses 
  	    select: [:c | c isSystemDefined not]
  	    thenDo: [:c  |
  			c theNonMetaClass superclass removeSubclass: c theNonMetaClass.
  			c theMetaClass superclass removeSubclass: c theMetaClass].
  	"Clear the paste buffer"
  	HandMorph initialize.
  	"Clear the reference to the project tree in SkObject"
+ 	(Smalltalk classNamed: 'SkObject') ifNotNil:
+ 		[:c | c initialize].
+ 	PasteUpMorph allInstancesDo:
+ 		[:m | m presenter ifNotNil: [:p | p flushPlayerListCache]].
- 	(Smalltalk classNamed: 'SkObject') ifNotNil: [:c | c initialize].
- 	PasteUpMorph allInstancesDo: [:m | m presenter ifNotNil: [:p | p flushPlayerListCache]].
  	Smalltalk garbageCollect!

Item was changed:
  ----- Method: Project class>>makeANewLocalGallery (in category '*Etoys-Squeakland-utilities') -----
  makeANewLocalGallery
  	| m pvm |
  	m := Morph new
  		changeTableLayout;
  		listDirection: #leftToRight;
  		wrapDirection: #topToBottom;
  		yourself.
+ 	(((FileDirectory default fileNamesMatching: '*.pr') collect:
+ 		[:fname | (Project parseProjectFileName: fname) first])
+ 			asSet sorted) do:
+ 				[:fname |
+ 				pvm := ProjectViewMorph new.
+ 				m addMorph: (pvm
+ 					project: (DiskProxy global: #Project selector: #named: args: {fname}))].
- 	(((FileDirectory default fileNamesMatching: '*.pr')
- 		collect: [:name | (Project parseProjectFileName: name) first]) asSet sorted) do: [:name |
- 			pvm := ProjectViewMorph new.
- 			m addMorph: (pvm
- 				project: (DiskProxy global: #Project selector: #named: args: {name}))].
  	m openInHand!

Item was changed:
  ----- Method: VariableNode>>variableGetterBlockIn: (in category '*Etoys-tiles') -----
  variableGetterBlockIn: aContext
  
+ 	| temps iVarIndex ivars |
- 	| temps index ivars |
  
  	(self type = 4 and: [self key isVariableBinding]) ifTrue: [
  		^[self key value]
  	].
  	aContext ifNil: [^nil].
  	self isSelfPseudoVariable ifTrue: [^[aContext receiver]].
  	self type = 1 ifTrue: [
  		ivars := aContext receiver class allInstVarNames.
+ 		iVarIndex := ivars indexOf: self name ifAbsent: [^nil].
+ 		^[aContext receiver instVarAt: iVarIndex]
- 		index := ivars indexOf: self name ifAbsent: [^nil].
- 		^[aContext receiver instVarAt: index]
  	].
  	self type = 2 ifTrue: [
  		temps := aContext tempNames.
+ 		iVarIndex := temps indexOf: self name ifAbsent: [^nil].
+ 		^[aContext tempAt: iVarIndex]
- 		index := temps indexOf: self name ifAbsent: [^nil].
- 		^[aContext tempAt: index]
  	].
  	^nil!



More information about the Squeak-dev mailing list