ArrayedCollection.st
changeset 14058 670252a21fb9
parent 14057 f76da752a6d4
child 14112 9fc40252441e
--- a/ArrayedCollection.st	Thu Mar 08 21:26:34 2012 +0100
+++ b/ArrayedCollection.st	Thu Mar 08 21:29:30 2012 +0100
@@ -1,6 +1,6 @@
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -12,10 +12,10 @@
 "{ Package: 'stx:libbasic' }"
 
 SequenceableCollection subclass:#ArrayedCollection
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Collections-Abstract'
+        instanceVariableNames:''
+        classVariableNames:''
+        poolDictionaries:''
+        category:'Collections-Abstract'
 !
 
 !ArrayedCollection class methodsFor:'documentation'!
@@ -23,7 +23,7 @@
 copyright
 "
  COPYRIGHT (c) 1989 by Claus Gittinger
-	      All Rights Reserved
+              All Rights Reserved
 
  This software is furnished under a license and may be used
  only in accordance with the terms of that license and with the
@@ -268,20 +268,20 @@
     newSize := aCollection size.
     newCollection := self new:newSize.
     aCollection isSequenceable ifTrue:[
-	"/
-	"/ aCollection has indexed elements
-	"/ a block-replace may be faster
-	"/
-	newCollection replaceFrom:1 to:newSize with:aCollection startingAt:1
+        "/
+        "/ aCollection has indexed elements
+        "/ a block-replace may be faster
+        "/
+        newCollection replaceFrom:1 to:newSize with:aCollection startingAt:1
     ] ifFalse:[
-	"/
-	"/ must enumerate the elements individually
-	"/
-	index := 1.
-	aCollection do:[:element |
-	    newCollection at:index put:element.
-	    index := index + 1
-	]
+        "/
+        "/ must enumerate the elements individually
+        "/
+        index := 1.
+        aCollection do:[:element |
+            newCollection at:index put:element.
+            index := index + 1
+        ]
     ].
     ^ newCollection
 
@@ -363,7 +363,7 @@
     |cls|
 
     (cls := self class) instSize == 0 ifTrue:[
-	^ cls new:size
+        ^ cls new:size
     ].
     ^ super copyEmptyAndGrow:size
 ! !
@@ -384,73 +384,6 @@
     "Modified: 18.7.1996 / 21:39:09 / cg"
 ! !
 
-!ArrayedCollection methodsFor:'inspecting'!
-
-inspector2TabForHexDump
-    "a tab, showing a hex dump"
-
-    |wrapper myByteSize v genDump baseAddress|
-
-    myByteSize := self size * self class elementByteSize.
-
-    wrapper := Plug new.
-    wrapper respondTo:#size with:[ myByteSize ].
-    wrapper respondTo:#at: with:[:byteIdx | self byteAt:byteIdx ].
-    wrapper respondTo:#do: with:[:aBlock | 1 to:myByteSize 
-                                            do:[:i |
-                                                aBlock value:(self byteAt:i) 
-                                            ].
-                                ].
-
-    baseAddress := 0.
-    genDump := [
-                    |dump|
-
-                    v topView withWaitCursorDo:[
-                        dump := AbstractFileBrowser 
-                            contentsOfBytesAsHexDump:wrapper 
-                            numberOfAddressDigits:(myByteSize hexPrintString size) 
-                            addressStart:baseAddress.
-                        v list:dump expandTabs:false scanForNonStrings:false includesNonStrings:false.
-                    ].
-               ].
-
-    v := ScrollableView for:TextView. 
-    genDump value.
-
-    v scrolledView 
-        menuHolder:
-            [    
-                |m| 
-
-                m := v scrolledView editMenu.
-                m addLabel:'-' selector:nil.
-                m addLabel:'Change Base Address...' selector:#changeBase.
-                m actionAt:#changeBase 
-                    put:[ 
-                        |s b|
-
-                        s := Dialog request:'Base address (hex):' initialAnswer:(baseAddress printStringRadix:16).
-                        s notEmptyOrNil ifTrue:[
-                            b := Integer readFrom:s radix:16 onError:nil.
-                            b notNil ifTrue:[
-                                baseAddress := b. genDump value
-                            ].
-                        ].
-                    ].
-                m.
-            ];
-        menuMessage: #value.
-
-    ^ Tools::Inspector2Tab new
-            priority: 40;
-            label:'Hexdump';
-            view: v;
-            yourself
-
-    "Created: / 13-02-2012 / 15:08:42 / cg"
-! !
-
 !ArrayedCollection methodsFor:'printing & storing'!
 
 storeOn:aStream
@@ -569,5 +502,5 @@
 !ArrayedCollection class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.61 2012-03-08 20:26:34 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ArrayedCollection.st,v 1.62 2012-03-08 20:29:30 cg Exp $'
 ! !