'From etoys3.0 of 24 February 2008 [latest update: #2157] on 24 September 2008 at 12:57:05 pm'! "Change Set: scriptNameTileFixup-sw Date: 22 October 2008 Author: Scott Wallace Some old projects from earlier versions of etoys can have faulty structure in ScriptNameTiles. This update adds fixing up such tiles to the procedures undertaken under 'attempt misc repairs' in authoring-tools menu. "! !PasteUpMorph methodsFor: 'world menu' stamp: 'sw 9/24/2008 12:57'! attemptCleanupReporting: whetherToReport "Try to fix up some bad things that are known to occur in some etoy projects we've seen. If the whetherToReport parameter is true, an informer is presented after the cleanups" | fixes faultyStatusControls | fixes _ 0. ActiveWorld ifNotNil: [(ActiveWorld submorphs select: [:m | (m isKindOf: ScriptEditorMorph) and: [m submorphs isEmpty]]) do: [:m | m delete. fixes _ fixes + 1]]. TransformationMorph allSubInstancesDo: [:m | (m player notNil and: [m renderedMorph ~~ m]) ifTrue: [m renderedMorph visible ifFalse: [m renderedMorph visible: true. fixes _ fixes + 1]]]. (Player class allSubInstances select: [:cl | cl isUniClass]) do: [:aUniclass | fixes _ fixes + aUniclass cleanseScripts]. self presenter flushPlayerListCache; allExtantPlayers. faultyStatusControls := ScriptStatusControl allInstances select: [:m |m fixUpScriptInstantiation]. fixes := fixes + faultyStatusControls size. ScriptNameTile allInstancesDo: [:aTile | aTile submorphs isEmpty ifTrue: [aTile setLiteral: aTile literal. fixes := fixes + 1]]. whetherToReport ifTrue: [self inform: ('{1} [or more] repair(s) made' translated format: {fixes printString})] ifFalse: [fixes > 0 ifTrue: [Transcript cr; show: fixes printString, ' repairs made to existing content.']] " ActiveWorld attemptCleanupReporting: true. ActiveWorld attemptCleanupReporting: false. "! !