# HG changeset patch # User Claus Gittinger # Date 1460475313 -7200 # Node ID a0933d5dc2c1bdc5db5c537f11d9345514a2e995 # Parent 4b3e638ea230fc7ac2a6b48d6772fb8d0382a2f8 hexdump (in inspector) for 2-byte chars fixed diff -r 4b3e638ea230 -r a0933d5dc2c1 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"