removeInstVarName for meta classes
authorClaus Gittinger <cg@exept.de>
Mon, 30 Oct 2000 13:57:52 +0100
changeset 5689 320f0733e0f0
parent 5688 cb6f36cb44f0
child 5690 e5efb5ecbe6a
removeInstVarName for meta classes
ClassDescription.st
--- a/ClassDescription.st	Mon Oct 30 13:56:34 2000 +0100
+++ b/ClassDescription.st	Mon Oct 30 13:57:52 2000 +0100
@@ -563,10 +563,12 @@
 !ClassDescription methodsFor:'Compatibility - ST80'!
 
 addInstVarName:anotherInstVar
-    |sel newClass args|
+    |sel newClass args newNames|
+
+    newNames := self instanceVariableString , ' ' , anotherInstVar.
 
     self isMeta ifTrue:[
-        ^ self instanceVariableNames:(self instanceVariableString , ' ' , anotherInstVar).
+        ^ self instanceVariableNames:newNames.
     ].
 
     sel := self definitionSelector.
@@ -574,7 +576,7 @@
     do:[
         args := Array 
                     with:(self name)
-                    with:(self instanceVariableString , ' ' , anotherInstVar)
+                    with:newNames
                     with:(self classVariableString)
                     with:''
                     with:(self category).
@@ -603,13 +605,18 @@
 
     newNames := self instVarNames.
     newNames remove:anInstVar ifAbsent:[^ self].
+    newNames := newNames asStringWith:Character space.
+
+    self isMeta ifTrue:[
+        ^ self instanceVariableNames:newNames.
+    ].
 
     sel := self definitionSelector.
     Class nameSpaceQuerySignal answer:(self nameSpace)
     do:[
         args := Array 
                     with:(self name)
-                    with:(newNames asStringWith:Character space)
+                    with:newNames
                     with:(self classVariableString)
                     with:''
                     with:(self category).
@@ -3778,6 +3785,6 @@
 !ClassDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.112 2000-10-30 12:56:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.113 2000-10-30 12:57:52 cg Exp $'
 ! !
 ClassDescription initialize!