Metaclass.st
changeset 5027 6a497c16e342
parent 4804 531640dcad3e
child 5191 3da2c7f61745
--- a/Metaclass.st	Mon Nov 29 14:46:02 1999 +0100
+++ b/Metaclass.st	Mon Nov 29 15:21:58 1999 +0100
@@ -1060,7 +1060,10 @@
                       oldClass addChangeRecordForClassComment:oldClass.
                   ]
               ]. 
-              oldClass package:newClass package.
+              "/ mhmh - dont do this here ...
+              "/ ... otherwise, we have to change all methods package info
+              "/ to belong to the old package.
+"/              oldClass package:pkg.
 
               (oldClassVars = newClassVars) ifTrue:[
                   "/ really no change (just comment and/or category)
@@ -1402,6 +1405,16 @@
     "/ class eventually vanishes ...
     self recompileMachineCodeMethodsIn:newClass.
 
+    (oldPkg notNil and:[oldPkg ~= pkg]) ifTrue:[
+        "/ we have to change all methods package info
+        "/ to belong to the old package.
+        newClass methodDictionary keysAndValuesDo:[:sel :mthd |
+            mthd package:oldPkg
+        ].
+        newClass class methodDictionary keysAndValuesDo:[:sel :mthd |
+            mthd package:oldPkg
+        ].
+    ].
 
     "/ WOW, everything done for this class
     "/ what about subclasses ?
@@ -2059,6 +2072,6 @@
 !Metaclass class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.157 1999-09-24 11:29:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Metaclass.st,v 1.158 1999-11-29 14:21:58 cg Exp $'
 ! !
 Metaclass initialize!