'From Squeak3.1alpha of 28 February 2001 [latest update: #4072] on 24 May 2001 at 10:56:07 pm'! "Change Set: scriptNameFix-sw Date: 24 May 2001 Author: Scott Wallace Fixes a loose end in update 4043"! !Player methodsFor: 'scripts-kernel' stamp: 'sw 5/24/2001 17:59'! renameScript: oldSelector newSelector: newSelector "Rename the given script to have the new selector" | aUserScript anInstantiation | oldSelector = newSelector ifTrue: [^ self]. self class allSubInstancesDo: [:aPlayer | anInstantiation _ aPlayer scriptInstantiationForSelector: oldSelector. anInstantiation changeSelectorTo: newSelector. aPlayer costume actorState instantiatedUserScriptsDictionary removeKey: oldSelector; at: newSelector put: anInstantiation. anInstantiation assureEventHandlerRepresentsStatus]. aUserScript _ self class userScriptForPlayer: self selector: oldSelector. aUserScript renameScript: newSelector fromPlayer: self. "updates all script editors, and inserts the new script in my scripts directory" self class removeScriptNamed: oldSelector. self updateAllViewersAndForceToShow: 'scripts'! ! !ScriptInstantiation methodsFor: 'misc' stamp: 'sw 5/24/2001 16:01'! printOn: aStream "Print the receiver on aStream" super printOn: aStream. aStream nextPutAll: ' (', self oopString, ') '. aStream nextPutAll: ' for #', selector asString! !