dont crash in set showing all indexed vars
authorjames
Thu, 19 Sep 2002 14:11:27 +0200
changeset 3884 4329e6c615a5
parent 3883 f14dd955891d
child 3885 436e7008bd59
dont crash in set showing all indexed vars
InspectorView.st
SetInspectorView.st
--- a/InspectorView.st	Thu Sep 19 11:12:10 2002 +0200
+++ b/InspectorView.st	Thu Sep 19 14:11:27 2002 +0200
@@ -985,7 +985,7 @@
         indexedList := self indexedFieldList.
 
         hideReceiver ifFalse:[
-            indexedList notNil ifTrue:[
+            (indexedList notNil and:[self showAllIndexedVarsInFieldList]) ifTrue:[
                 aList addFirst:'-all indexed vars'.
             ].
             cls instSize > 0 ifTrue:[
@@ -1051,6 +1051,10 @@
     inspectedObject basicAt:idx put:newValue
 !
 
+indexedValueAtKey:key
+    ^ inspectedObject at:key
+!
+
 instVarIndexForLine:lineNr
     "helper - return the index for a named instVar;
      nil, if self or a keyed instvar is selected."
@@ -1229,6 +1233,10 @@
     "Modified: 1.8.1997 / 21:47:09 / cg"
 !
 
+showAllIndexedVarsInFieldList
+    ^ true
+!
+
 showMore
     |o|
 
@@ -1301,8 +1309,7 @@
         ].
 
         s nextPutAll:' : '.
-        "/ val := self indexedValueAtIndex:eachIdx.
-        val := inspectedObject at:eachIdx.
+        val := self indexedValueAtKey:eachIdx.
 
         varString := val displayString.
         (varString includes:Character cr) ifTrue:[
@@ -1621,5 +1628,5 @@
 !InspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.132 2002-09-14 13:00:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.133 2002-09-19 12:11:27 james Exp $'
 ! !
--- a/SetInspectorView.st	Thu Sep 19 11:12:10 2002 +0200
+++ b/SetInspectorView.st	Thu Sep 19 14:11:27 2002 +0200
@@ -122,6 +122,10 @@
     super release
 
     "Created: 9.2.1996 / 12:04:30 / stefan"
+!
+
+showAllIndexedVarsInFieldList
+    ^ false
 ! !
 
 !SetInspectorView methodsFor:'user interaction'!
@@ -152,6 +156,10 @@
     ^ keys at:idx
 !
 
+indexedValueAtKey:idx
+    ^ keys at:idx
+!
+
 valueAtLine:lineNr put:newValue
     "store newValue;
      For non-named instvars, we add the new value - ignoring the selection"
@@ -174,5 +182,5 @@
 !SetInspectorView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/SetInspectorView.st,v 1.18 2002-09-14 17:31:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/SetInspectorView.st,v 1.19 2002-09-19 12:11:24 james Exp $'
 ! !