ContextInspectorView.st
changeset 15591 3eee78f89c1e
parent 14616 671b0b0f3632
child 15596 c11cc9c2974d
child 16479 38ff09a72df0
--- a/ContextInspectorView.st	Wed Apr 22 19:25:52 2015 +0200
+++ b/ContextInspectorView.st	Wed Apr 22 19:50:00 2015 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
@@ -11,6 +13,8 @@
 "
 "{ Package: 'stx:libtool' }"
 
+"{ NameSpace: Smalltalk }"
+
 InspectorView subclass:#ContextInspectorView
 	instanceVariableNames:'inspectedContext names showingTemporaries argsOnly contextSize
 		workspaceVariableNamesInDoIts'
@@ -554,36 +558,34 @@
 stringWithAllNames:names andValues:values
     "helper for '-all local vars' and '-all workspace vars'"
 
-    |s  maxLen varString|
+    |outStream  maxLen varString|
 
-    s := '' writeStream.
+    outStream := CharacterWriteStream new.
     maxLen := (names collect:[:eachName | eachName size]) max.
 
     names with:values do:[:eachName :eachValue |
-        s nextPutAll:((eachName , ' ') paddedTo:maxLen+1 with:$.).
-        s nextPutAll:' : '.
+        outStream nextPutAll:((eachName , ' ') paddedTo:maxLen+1 with:$.).
+        outStream nextPutAll:' : '.
 
         [
             |s|
 
-            s := WriteStream on:(String new:10).
+            s := CharacterWriteStream new.
             s writeLimit:100000.
             eachValue displayOn:s.
             varString := s contents.
-"/            varString := (self valueAtIndex:varIdx) displayString.
         ] on:Error do:[:ex |
             varString := ('*** Error in displayString (%1)***' bindWith:ex description)
         ].
-        varString := varString ? ''.
 
         (varString includes:Character cr) ifTrue:[
             varString := varString copyTo:(varString indexOf:Character cr)-1.
             varString := varString , '...'.
         ].
-        s nextPutAll:varString.
-        s cr.
+        outStream nextPutAll:varString.
+        outStream cr.
     ].
-    ^ s contents
+    ^ outStream contents
 !
 
 stringWithAllWorkspaceValues
@@ -747,10 +749,10 @@
 !ContextInspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.97 2014-07-08 21:53:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.98 2015-04-22 17:50:00 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.97 2014-07-08 21:53:39 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/ContextInspectorView.st,v 1.98 2015-04-22 17:50:00 stefan Exp $'
 ! !