[squeak-dev] The Trunk: EToys-tfel.249.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Sep 23 13:27:26 UTC 2016


Tim Felgentreff uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-tfel.249.mcz

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

Name: EToys-tfel.249
Author: tfel
Time: 23 September 2016, 3:26:09.056418 pm
UUID: 844e5444-0afb-144b-a622-dcb33fbf8597
Ancestors: EToys-tfel.248

fix the defensive code for updating status morphs in scripts

=============== Diff against EToys-tfel.248 ===============

Item was changed:
  ----- Method: ScriptInstantiation>>updateAllStatusMorphs (in category 'status control') -----
  updateAllStatusMorphs
  	"Update all status morphs bound to the receiver.  Done with a sledge-hammer at present."
  
  	| w |
  	w := self currentWorld.
+ 	(w hasProperty: #updateStatusMorph) ifTrue: [^ self].
+ 	w setProperty: #updateStatusMorph toValue: true.
+ 	Project current addDeferredUIMessage: [
+ 		(w valueOfProperty: #updateStatusMorph ifAbsent: [false]) ifTrue: [
+ 			(w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and:
+ 				[m scriptInstantiation == self]]) do:
+ 				[:aStatusControl | self updateStatusMorph: aStatusControl].
+ 			w removeProperty: #updateStatusMorph.
- 	
- 	(w hasProperty: #foo) ifFalse: [	
- 		w setProperty: #updateStatusMorph toValue: true.
- 		Project current addDeferredUIMessage: [
- 			(w hasProperty: #foo) ifTrue: [
- 				w removeProperty: #updateStatusMorph.
- 				(w allMorphs select: [:m | (m isKindOf: ScriptStatusControl) and:
- 					[m scriptInstantiation == self]]) do:
- 					[:aStatusControl | self updateStatusMorph: aStatusControl]		.		
- 			]
  		]
  	]
  
  !



More information about the Squeak-dev mailing list