[etoys-dev] Etoys: Morphic-bf.27.mcz
commits at source.squeak.org
commits at source.squeak.org
Sat Jun 26 08:35:38 EDT 2010
Bert Freudenberg uploaded a new version of Morphic to project Etoys:
http://source.squeak.org/etoys/Morphic-bf.27.mcz
==================== Summary ====================
Name: Morphic-bf.27
Author: bf
Time: 26 June 2010, 2:34:02 pm
UUID: 1f191db0-0441-4550-832b-068903c9319a
Ancestors: Morphic-bf.26
- fix an ambiguous translation in abandonUnsituatedPlayers (SQ-649)
=============== Diff against Morphic-bf.26 ===============
Item was changed:
----- Method: PasteUpMorph>>abandonUnsituatedPlayers (in category 'menu') -----
abandonUnsituatedPlayers
"If any objects in the project have references, in player-valued variables, to other objects otherwise not present in the project, abandon them and replace former references to them by references to Dot"
| aList dot slotInfo varName ref allPlayers count |
count := 0.
allPlayers := ActiveWorld presenter reallyAllExtantPlayersNoSort.
aList := allPlayers select: [:m | m belongsToUniClass].
dot := self presenter standardPlayer.
aList do:
[:p |
p class slotInfo associationsDo:
[:assoc |
slotInfo := assoc value.
varName := assoc key.
(slotInfo type = #Player) ifTrue:
[ref := p instVarNamed: varName.
(allPlayers includes: ref) ifFalse:
[p instVarNamed: varName put: dot.
count := count + 1.
+ Transcript cr; show: ('Variable named "{1}" in player named "{2}" changed to point to Dot' translated format: {varName. ref externalName})]]]].
- Transcript cr; show: 'Variable named' translated, ' "', varName, '" ', 'in' translated, ' player named' translated, ' "', ref externalName, '" ', 'changed to point to Dot']]]].
aList := nil. "Increases chance of the next line having desired effect."
+ self inform: ('{1} item(s) fixed up' translated format: {count}).
- self inform: count printString, ' item(s) fixed up' translated.
WorldState addDeferredUIMessage: [Smalltalk garbageCollect]!
More information about the etoys-dev
mailing list