--- a/Class.st Tue Nov 14 18:46:01 2000 +0100
+++ b/Class.st Wed Nov 15 13:38:06 2000 +0100
@@ -392,11 +392,16 @@
].
].
self addChangeRecordForClass:self.
+
self changed:#definition.
(namespace := self nameSpace) changed:#classDefinition with:self.
namespace ~~ Smalltalk ifTrue:[
Smalltalk changed:#classDefinition with:self.
].
+ (namespace := self nameSpace) changed:#classVariables with:self.
+ namespace ~~ Smalltalk ifTrue:[
+ Smalltalk changed:#classVariables with:self.
+ ].
]
"Created: / 29.10.1995 / 19:40:51 / cg"
@@ -468,6 +473,20 @@
^ Smalltalk at:(self name , ':' , aSymbol) asSymbol
!
+classVarAt:aSymbol ifAbsent:exceptionBlock
+ "return the value of a class variable.
+ Currently, this returns nil if there is no such classvar -
+ this may change."
+
+ "
+ this hides the (current) implementation of classVariables
+ from the outside world. Currently, classvars are stored in
+ the Smalltalk dictionary with a funny name, since there are
+ no classPools yet.
+ "
+ ^ Smalltalk at:(self name , ':' , aSymbol) asSymbol ifAbsent:exceptionBlock
+!
+
classVarAt:aSymbol put:something
"store something in a classvariable.
Currently this creates a global with a funny name if no such
@@ -922,11 +941,16 @@
].
].
self addChangeRecordForClass:self.
+
self changed:#definition.
(namespace := self nameSpace) changed:#classDefinition with:self.
namespace ~~ Smalltalk ifTrue:[
Smalltalk changed:#classDefinition with:self.
].
+ (namespace := self nameSpace) changed:#classVariables with:self.
+ namespace ~~ Smalltalk ifTrue:[
+ Smalltalk changed:#classVariables with:self.
+ ].
]
"Created: / 29.10.1995 / 19:42:08 / cg"
@@ -4518,5 +4542,5 @@
!Class class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.384 2000-11-14 13:41:06 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.385 2000-11-15 12:38:06 cg Exp $'
! !