class: MCClassDefinition
authorClaus Gittinger <cg@exept.de>
Mon, 25 Mar 2013 15:33:07 +0100
changeset 766 94bc6e95d8b1
parent 765 03519ebb18d1
child 767 8054b14c28d5
class: MCClassDefinition changed: #printDefinitionOn: generate a class definiton which squeak can read for classes with a name containing an underline. (Squeak can read and show the definition, but still not accept it)
MCClassDefinition.st
--- a/MCClassDefinition.st	Mon Mar 25 14:23:40 2013 +0100
+++ b/MCClassDefinition.st	Mon Mar 25 15:33:07 2013 +0100
@@ -446,11 +446,22 @@
 !
 
 printDefinitionOn: stream
+                |clsName|
+
                 stream 
                         nextPutAll: self superclassName;
-                        nextPutAll: self kindOfSubclass;
-                        nextPut: $# ;
+                        nextPutAll: self kindOfSubclass.
+                ((clsName := self className) includes:$_) ifTrue:[
+                    stream 
+                        nextPutAll: '#''' ;
                         nextPutAll: self className;
+                        nextPutAll: '''' .
+                ] ifFalse:[
+                    stream 
+                        nextPut: $#;
+                        nextPutAll: self className.
+                ].
+                stream
                         cr; tab.
                 self hasTraitComposition ifTrue: [
                         stream 
@@ -605,11 +616,11 @@
 !MCClassDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCClassDefinition.st,v 1.10 2013-01-18 12:56:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCClassDefinition.st,v 1.11 2013-03-25 14:33:07 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCClassDefinition.st,v 1.10 2013-01-18 12:56:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/goodies/monticello/MCClassDefinition.st,v 1.11 2013-03-25 14:33:07 cg Exp $'
 !
 
 version_SVN