Class.st
changeset 1741 0d16c862d652
parent 1739 64afb1cba77d
child 1743 18eed89fe918
--- a/Class.st	Mon Oct 14 18:40:28 1996 +0200
+++ b/Class.st	Mon Oct 14 19:09:35 1996 +0200
@@ -1790,6 +1790,8 @@
 
     |s owner|
 
+    owner := self owningClass.
+
     "take care of nil-superclass"
     superclass isNil ifTrue:[
         s := 'nil'
@@ -1800,7 +1802,11 @@
     aStream nextPutAll:s.
     aStream space.
     self basicFileOutInstvarTypeKeywordOn:aStream.
-    aStream nextPutAll:name storeString.
+    owner isNil ifTrue:[
+        aStream nextPutAll:name storeString.
+    ] ifFalse:[
+        aStream nextPut:$#; nextPutAll:(self namePrintString).
+    ].
 
     aStream crtab. 
     aStream nextPutAll:'instanceVariableNames:'''.
@@ -1816,7 +1822,7 @@
     aStream nextPutAll:'poolDictionaries:'''''.
 
     aStream crtab.
-    (owner := self owningClass) isNil ifTrue:[
+    owner isNil ifTrue:[
         "/ a public class
         aStream nextPutAll:'category:'.
         category isNil ifTrue:[
@@ -1832,7 +1838,7 @@
     ].
     aStream cr
 
-    "Modified: 14.10.1996 / 17:07:40 / cg"
+    "Modified: 14.10.1996 / 17:45:02 / cg"
 !
 
 basicFileOutInstvarTypeKeywordOn:aStream
@@ -2547,6 +2553,18 @@
 
 !Class methodsFor:'printOut'!
 
+namePrintString
+    "helper for fileOut - return my names printString, without any 
+     privacy prefix"
+
+    |idx|
+
+    idx := name lastIndexOf:$:.
+    ^ name copyFrom:idx+1.
+
+    "Modified: 14.10.1996 / 17:44:41 / cg"
+!
+
 printClassNameOn:aStream
     "helper for fileOut - print my name if I am not a Metaclass;
      otherwise my name without -class followed by space-class"
@@ -3799,6 +3817,6 @@
 !Class class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.180 1996-10-14 16:37:50 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Class.st,v 1.181 1996-10-14 17:09:35 cg Exp $'
 ! !
 Class initialize!