'From Squeak3.7alpha of 11 September 2003 [latest update: #5816] on 11 March 2004 at 3:56:06 pm'! "Change Set: SystemDictRenameClasses Date: 11 March 2004 Author: Romain Robbes The event triggered by the SystemChangeNotifier had a nil class category, as it was fetching it after the class was renamed. This fix stores the category in a temp before the renaming. "! !SystemDictionary methodsFor: 'class names' stamp: 'rr 3/11/2004 15:18'! renameClass: aClass as: newName "Rename the class, aClass, to have the title newName." | oldref i oldName category | oldName := aClass name. category := aClass category. SystemOrganization classify: newName under: aClass category. SystemOrganization removeElement: aClass name. oldref _ self associationAt: aClass name. self removeKey: aClass name. oldref key: newName. self add: oldref. "Old association preserves old refs" (Array with: StartUpList with: ShutDownList) do: [:list | i _ list indexOf: aClass name ifAbsent: [0]. i > 0 ifTrue: [list at: i put: newName]]. self flushClassNameCache. SystemChangeNotifier uniqueInstance classRenamed: aClass from: oldName to: newName inCategory: category! !