Class.st
changeset 9693 679da2cd8003
parent 9653 e77201144723
child 9724 48fd8714ebae
--- a/Class.st	Thu Aug 24 10:57:46 2006 +0200
+++ b/Class.st	Thu Aug 24 10:57:59 2006 +0200
@@ -735,6 +735,12 @@
     ^ classFilename
 !
 
+getPackage
+    "get the package or nil."
+
+    ^ package
+!
+
 globalKeyForClassVar:aStringOrSymbol
     "this helps to encapsulate the (current) implementation of classVariables
      from the outside world. Currently, classvars are stored in
@@ -784,12 +790,13 @@
 !
 
 package
-    "return the package-id of the class"
+    "return the package-ID of the class"
 
     |owner|
 
     (owner := self owningClass) notNil ifTrue:[^ owner package].
-    ^ package ? ''
+    package isNil ifTrue:[^ Project noProjectID].
+    ^ package
 
     "
      Object package
@@ -801,7 +808,11 @@
 package:aSymbol
     "set the package of the class."
 
-    package := aSymbol
+    aSymbol == Project noProjectID ifTrue:[
+        package := nil
+    ] ifFalse:[
+        package := aSymbol
+    ]
 
     "Modified: / 09-08-2006 / 17:58:53 / fm"
 !
@@ -4578,5 +4589,5 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.498 2006-08-23 14:06:18 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.499 2006-08-24 08:57:59 cg Exp $'
 ! !