'From Squeak3.7 of ''4 September 2004'' [latest update: #5988] on 7 November 2004 at 1:44:08 pm'! "Change Set: InspectorFix Date: 7 November 2004 Author: Boris GŠrtner When you select the line 'all inst vars' in an inspector view, you get into trouble for objects that contain circularities. This is an attempt to fix the problem. Example: | foo bar | foo _ Dictionary new. bar _ Dictionary new. foo at: #Bob put: #Jones. foo at: #O put: bar. bar at: #Bob put: #Smith. bar at: #O put: foo. (OrderedCollection with: foo with: bar) "! !Object methodsFor: 'printing' stamp: 'BG 11/7/2004 13:39'! longPrintStringLimitedTo: aLimitValue "Answer a String whose characters are a description of the receiver." | str | str _ String streamContents: [:aStream | self longPrintOn: aStream limitedTo: aLimitValue indent: 0]. "Objects without inst vars should return something" ^ str isEmpty ifTrue: [self printString, String cr] ifFalse: [str]! ! !Inspector methodsFor: 'selecting' stamp: 'BG 11/7/2004 13:40'! selection "The receiver has a list of variables of its inspected object. One of these is selected. Answer the value of the selected variable." | basicIndex | selectionIndex = 0 ifTrue: [^ '']. selectionIndex = 1 ifTrue: [^ object]. selectionIndex = 2 ifTrue: [^ object longPrintStringLimitedTo: 20000]. (selectionIndex - 2) <= object class instSize ifTrue: [^ object instVarAt: selectionIndex - 2]. basicIndex _ selectionIndex - 2 - object class instSize. (object basicSize <= (self i1 + self i2) or: [basicIndex <= self i1]) ifTrue: [^ object basicAt: basicIndex] ifFalse: [^ object basicAt: object basicSize - (self i1 + self i2) + basicIndex]! !