BrowserView.st
changeset 1000 b39cc2efca8e
parent 991 893a4dc659af
child 1015 b3727346969f
--- a/BrowserView.st	Sat Jan 25 01:06:01 1997 +0100
+++ b/BrowserView.st	Sat Jan 25 14:56:42 1997 +0100
@@ -4130,25 +4130,24 @@
     "helper - do the rename"
 
     self doClassMenu:[:currentClass |
-        |oldName oldSym newSym cls|
+        |oldSym cls|
+
+        "/ check if the target already exists - confirm if so.
 
         (cls := Smalltalk classNamed:aString) notNil ifTrue:[
-            (self confirm:(resources string:'WARN_RENAME' with:aString with:cls category) withCRs)
+            (self confirm:(resources string:'WARN_RENAME' 
+                                     with:aString 
+                                     with:cls category) withCRs)
                 ifFalse:[^ self]
         ].
 
-        oldName := currentClass name.
-        oldSym := oldName asSymbol.
-"
-        currentClass setName:aString.
-        newSym := aString asSymbol.
-        Smalltalk at:oldSym put:nil.
-        Smalltalk removeKey:oldSym.            
-        Smalltalk at:newSym put:currentClass.
-"
-"
-        currentClass renameTo:aString.
-"
+        oldSym := currentClass name asSymbol.
+
+        "/
+        "/ renaming is actually more complicated as one might
+        "/ think (care for classVariables, privateClasses etc.)
+        "/ Smalltalk knows all about that ...
+
         Smalltalk renameClass:currentClass to:aString.
 
         self updateClassList.
@@ -4161,7 +4160,7 @@
     ]
 
     "Created: 25.11.1995 / 13:02:53 / cg"
-    "Modified: 18.5.1996 / 15:41:27 / cg"
+    "Modified: 25.1.1997 / 13:10:45 / cg"
 !
 
 switchToClass:newClass
@@ -9570,6 +9569,6 @@
 !BrowserView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.264 1997-01-24 17:51:38 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/BrowserView.st,v 1.265 1997-01-25 13:56:42 cg Exp $'
 ! !
 BrowserView initialize!