hexdump (in inspector) for 2-byte chars fixed
authorClaus Gittinger <cg@exept.de>
Tue, 12 Apr 2016 17:35:13 +0200
changeset 16283 a0933d5dc2c1
parent 16282 4b3e638ea230
child 16285 7009be618265
child 16287 e33a72e5e4eb
hexdump (in inspector) for 2-byte chars fixed
extensions.st
--- a/extensions.st	Tue Apr 12 17:33:22 2016 +0200
+++ b/extensions.st	Tue Apr 12 17:35:13 2016 +0200
@@ -431,18 +431,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 asByteArray hexPrintStringWithSeparator:Character space)
-                            ] ifFalse:[
-                                ((self copyTo:10000) asByteArray hexPrintStringWithSeparator:Character space),'...'
-                            ]); 
+                contents: (bytesShown asByteArray hexPrintStringWithSeparator:Character space); 
                 yourself)
 
     "Created: / 17-02-2008 / 10:10:50 / janfrog"