NewInspectorListView.st
author tz
Tue, 27 Jan 1998 19:32:28 +0100
changeset 493 fb8d3621eb2e
parent 327 0040d47658c6
child 809 6f127dd5e578
permissions -rw-r--r--
auto repeat for the magnify buttons added
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     1
"{ NameSpace: NewInspector }"
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     2
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     3
SelectionInListView subclass:#InspectorListView
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
     4
	instanceVariableNames:'actionHolder inspectorList includesSelf'
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     5
	classVariableNames:''
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     6
	poolDictionaries:''
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     7
	category:'Inspector'
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     8
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
     9
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    10
!InspectorListView class methodsFor:'documentation'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    11
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    12
examples
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    13
"
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    14
        open a list view on an instance
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    15
                                                                        [exBegin]
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    16
        |top slv a|
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    17
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    18
        a := OrderedCollection new.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    19
        a add:1.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    20
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    21
        top := StandardSystemView new
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    22
                label:'select';
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    23
                extent:200@200.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    24
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    25
        slv := ScrollableView for:self in:top.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    26
        slv origin:0.0@0.0 corner:1.0@1.0.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    27
        slv := slv scrolledView.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    28
        slv inspect:top.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    29
        slv action:[:el|Transcript showCR:(el printString)].
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    30
        top open
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    31
                                                                        [exEnd]
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    32
"
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    33
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    34
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    35
!InspectorListView methodsFor:'accessing'!
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    36
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    37
includesSelf:aBool
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    38
    includesSelf := aBool
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    39
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    40
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    41
list
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    42
    ^ inspectorList
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    43
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    44
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    45
list:aList
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    46
    "set the lists contents from another list
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    47
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    48
    aList notNil ifTrue:[inspectorList := aList list]
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    49
                ifFalse:[inspectorList := InspectorList new].
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    50
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    51
    inspectorList includesSelf:includesSelf.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    52
    super list:(inspectorList instanceNames).
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    53
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    54
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    55
update
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    56
    "update the current list
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    57
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    58
    inspectorList update.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    59
    super list:(inspectorList instanceNames).
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    60
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    61
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    62
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    63
!InspectorListView methodsFor:'accessing actions'!
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    64
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    65
action:aOneArgAction
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    66
    "set the single click action block. If non-nil, that one is evaluated on single
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    67
     click, passing the selected instance as argument
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    68
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    69
    actionHolder := aOneArgAction
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    70
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    71
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    72
!InspectorListView methodsFor:'drawing'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    73
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    74
drawVisibleLineSelected:visLineNr with:fg and:bg
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    75
    "redraw a single line as selected.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    76
    "
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    77
    |nr| 
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    78
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    79
    (nr := self visibleLineToListLine:visLineNr) notNil ifTrue:[
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    80
        ^ self drawVisibleLine:visLineNr with:fg and:bg.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    81
    ].
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    82
    ^ super drawVisibleLine:visLineNr with:fg and:bg
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    83
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    84
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    85
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    86
redrawArrowVisibleLine:visLineNr
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    87
    "draw a right arrow for visible line
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    88
    "
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    89
    |nr|
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    90
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    91
    nr := self visibleLineToListLine:visLineNr.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    92
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
    93
    (inspectorList instanceTypeAt:nr) == #directory ifTrue:[
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    94
        self drawRightArrowInVisibleLine:visLineNr
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    95
    ]
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    96
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    97
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    98
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
    99
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   100
redrawFromVisibleLine:startVisLineNr to:endVisLineNr
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   101
    "redefined to look for directory in every line
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   102
    "
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   103
    super redrawFromVisibleLine:startVisLineNr to:endVisLineNr.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   104
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   105
    startVisLineNr to:endVisLineNr do:[:visLineNr|
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   106
        self redrawArrowVisibleLine:visLineNr
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   107
    ]
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   108
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   109
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   110
redrawVisibleLine:visLineNr
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   111
    "if the line is one for a directory, draw a right arrow
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   112
    "
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   113
    super redrawVisibleLine:visLineNr.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   114
    self  redrawArrowVisibleLine:visLineNr.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   115
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   116
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   117
visibleLineNeedsSpecialCare:visLineNr
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   118
    "returns true if the visible line needs special care
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   119
    "
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   120
    |nr|
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   121
327
0040d47658c6 check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents: 39
diff changeset
   122
    nr := self visibleLineToListLine:visLineNr.
0040d47658c6 check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents: 39
diff changeset
   123
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   124
    (inspectorList instanceTypeAt:nr) == #directory ifTrue:[
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   125
        ^ true
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   126
    ].
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   127
    ^ super visibleLineNeedsSpecialCare:visLineNr
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   128
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   129
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   130
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   131
widthForScrollBetween:firstLine and:lastLine
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   132
    "return the width in pixels for a scroll between firstLine and lastLine
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   133
     - return full width here since there might be directory marks
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   134
    "
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   135
    ^ (width - margin - margin)
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   136
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   137
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   138
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   139
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   140
!InspectorListView methodsFor:'event handling'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   141
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   142
sizeChanged:how
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   143
    "redraw marks
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   144
    "
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   145
    super sizeChanged:how.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   146
    shown ifTrue:[self invalidate]
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   147
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   148
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   149
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   150
!InspectorListView methodsFor:'initialization'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   151
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   152
initialize
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   153
    "initialization
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   154
    "
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   155
    super initialize.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   156
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   157
    ignoreReselect := false.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   158
    includesSelf   := false.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   159
    actionHolder   := [:el|].
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   160
    inspectorList  := InspectorList new.
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   161
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   162
    actionBlock := [:dummy|
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   163
        self setSelection:selection.
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   164
        actionHolder value:(self selectedInstanceVar)
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   165
    ].
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   166
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   167
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   168
!InspectorListView methodsFor:'private'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   169
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   170
doesNotUnderstand:aMessage
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   171
    "forward a message to the inspectorList
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   172
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   173
    (inspectorList respondsTo:(aMessage selector)) ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   174
        ^ aMessage sendTo:inspectorList
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   175
    ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   176
    ^ super doesNotUnderstand:aMessage
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   177
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   178
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   179
!
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   180
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   181
list:aCollection keepSelection:aBoolean
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   182
    "set the list - redefined, since setting the list implies unselecting
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   183
     and clearing attributes."
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   184
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   185
    "somewhat of a kludge: if selection is first line,
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   186
     we have to remove the highlight frame by hand here"
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   187
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   188
    (shown and:[hilightLevel ~~ 0]) ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   189
        selection == firstLineShown ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   190
           self paint:bgColor.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   191
           self fillRectangleX:margin y:margin
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   192
                          width:(width - (margin * 2)) 
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   193
                         height:(hilightLevel abs).
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   194
        ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   195
    ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   196
    listAttributes := nil.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   197
    super list:aCollection expandTabs:false.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   198
    super setSelection:(inspectorList selection).
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   199
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   200
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   201
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   202
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   203
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   204
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   205
!InspectorListView methodsFor:'selections'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   206
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   207
setSelection:aNumberOrNil
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   208
    "select line, aNumber or deselect if argument is nil
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   209
    "
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   210
    |oldSize|
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   211
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   212
    oldSize := inspectorList size.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   213
    inspectorList setSelection:aNumberOrNil.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   214
    oldSize == inspectorList size ifTrue:[super setSelection:(inspectorList selection)]
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   215
                                 ifFalse:[super list:(inspectorList instanceNames)].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   216
! !
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   217
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   218
!InspectorListView methodsFor:'user interaction'!
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   219
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   220
accept:aText notifying:aView
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   221
    "evaluating aText on the selected instance var; if an error occurs #Error
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   222
     is returned otherwise the inspected object instance. On success the list
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   223
     will be updated.
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   224
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   225
    |res|
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   226
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   227
    res := inspectorList accept:aText notifying:aView.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   228
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   229
    res ~~ #Error ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   230
        super list:(inspectorList instanceNames)
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   231
    ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   232
    ^ res
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   233
!
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   234
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   235
doIt:aCode notifying:aView
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   236
    "evaluating aCode on the selected instance var; if an error occurs #Error
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   237
     is returned otherwise the result returned from the evaluator. On success
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   238
     the list will be updated.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   239
    "
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   240
    |res|
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   241
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   242
    res := inspectorList doIt:aCode notifying:aView.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   243
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   244
    res ~~ #Error ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   245
        super list:(inspectorList instanceNames)
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   246
    ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   247
    ^ res
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   248
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   249
!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   250
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   251
inspect:anObject
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   252
    "inspect a new instance; update contents
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   253
    "
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   254
    (inspectorList inspectedObject) == anObject ifTrue:[
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   255
        ^ self update
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   256
    ].
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   257
    inspectorList := InspectorList for:anObject.
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   258
    inspectorList includesSelf:includesSelf.
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   259
39
03af455029eb *** empty log message ***
ca
parents: 34
diff changeset
   260
    super list:(inspectorList instanceNames).
34
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   261
! !
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   262
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   263
!InspectorListView class methodsFor:'documentation'!
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   264
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   265
version
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   266
    ^ '$Header$'
0f083a268b66 intitial checkin
ca
parents:
diff changeset
   267
! !