class: ArrayedCollection class
authorClaus Gittinger <cg@exept.de>
Thu, 19 Sep 2019 12:15:22 +0200
changeset 19198 cdaab19788cd
parent 19197 1ecc8e3c2668
child 19199 8880dbb596d8
class: ArrayedCollection class changed: #hexDumpViewFor: support for hexView highlighting
extensions.st
--- a/extensions.st	Thu Sep 19 12:14:34 2019 +0200
+++ b/extensions.st	Thu Sep 19 12:15:22 2019 +0200
@@ -139,7 +139,7 @@
     "a tab, showing a hex dump; defined here, so that both byteArrays and other bulk data
      containers can define it in their inspector2Tabs methods."
 
-    |getByteSize wrapper v genDump baseAddress|
+    |getByteSize wrapper v genDump baseAddress highlightRangeHolder|
 
     getByteSize := [ instOrHolder value size * instOrHolder value class elementByteSize ].
 
@@ -154,21 +154,26 @@
                                     ].
                                 ].
 
+    highlightRangeHolder := (nil asValue).
+
     baseAddress := 0.
     genDump := [
                     |dump|
 
                     v topView withWaitCursorDo:[
                         dump := AbstractFileBrowser 
-                            contentsOfBytesAsHexDump:wrapper 
+                            contentsOfBytesAsDump:wrapper base:16
                             numberOfAddressDigits:(getByteSize value hexPrintString size) 
-                            addressStart:baseAddress.
+                            addressStart:baseAddress
+                            characterEncoding:#'iso8859-1'
+                            highlightRangeHolder:highlightRangeHolder.
                         v list:dump expandTabs:false scanForNonStrings:false includesNonStrings:false.
                     ].
                ].
 
     v := HVScrollableView for:TextView. 
     v autoHideScrollBars:true.
+    v objectAttributeAt:#highlightRangeHolder put:highlightRangeHolder.
     genDump value.
     instOrHolder onChangeEvaluate:genDump.