care for exclas in spec-code
authorClaus Gittinger <cg@exept.de>
Thu, 22 Jan 1998 20:59:48 +0100
changeset 457 0b39d43d4324
parent 456 e2bbb3f9c5fd
child 458 daa7b41dd2e3
care for exclas in spec-code
UIPainterView.st
--- a/UIPainterView.st	Thu Jan 22 20:28:03 1998 +0100
+++ b/UIPainterView.st	Thu Jan 22 20:59:48 1998 +0100
@@ -815,7 +815,7 @@
 !
 
 generateWindowSpecMethodSource
-    |spec str code category cls mthd|
+    |spec str code category cls mthd specCode|
 
     spec := OrderedCollection new.
 
@@ -827,6 +827,14 @@
     spec := treeView generateFullSpecForComponents:spec.
     str  := WriteStream on:String new.
     UISpecification prettyPrintSpecArray:spec on:str indent:5.
+    specCode := str contents.
+
+    (specCode includes:$!!) ifTrue:[
+        "/ oops - must be chunk format ...
+        str  := WriteStream on:String new.
+        str nextPutAllAsChunk:specCode.
+        specCode := str contents.
+    ].
 
     "/ if that method already exists, do not overwrite the category
 
@@ -859,7 +867,7 @@
             , '\'
             , '    <resource: #canvas>\\'
             , '    ^\' 
-            , '     ', str contents
+            , '     ', specCode
             , '\'
             , '!! !!'
             , '\\'.