extensions.st
branchjv
changeset 16285 7009be618265
parent 16256 65473fc50115
parent 16283 a0933d5dc2c1
child 16296 337374b5dbff
--- a/extensions.st	Sat Apr 09 08:55:09 2016 +0100
+++ b/extensions.st	Wed Apr 13 09:20:33 2016 +0100
@@ -441,18 +441,21 @@
 !CharacterArray methodsFor:'inspecting'!
 
 inspector2TabBytes
-
-    ^self newInspector2Tab
+    |bytesShown|
+    
+    "/ ouch - ever tried to inspect a 5Mb string?
+    self size < 10000 ifTrue:[
+        bytesShown := self
+    ] ifFalse:[
+        bytesShown := (self copyTo:10000)
+    ].
+    
+    ^ self newInspector2Tab
         label: 'Bytes';
         priority: 39;
         view: ((HVScrollableView for:EditTextView) 
                 autoHideVerticalScrollBar:true;        
-                contents: (self size < 10000 "/ ouch - ever tried to inspect a 5Mb string?
-                            ifTrue:[
-                                (self hexPrintStringWithSeparator:Character space)
-                            ] ifFalse:[
-                                ((self copyTo:10000) hexPrintStringWithSeparator:Character space),'...'
-                            ]); 
+                contents: (bytesShown asByteArray hexPrintStringWithSeparator:Character space); 
                 yourself)
 
     "Created: / 17-02-2008 / 10:10:50 / janfrog"