SetInspectorView.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 29 Jan 2012 15:33:37 +0000
branchjv
changeset 12125 0c49a3b13e43
parent 12123 4bde08cebd48
child 12128 a7ff7d66ee85
permissions -rw-r--r--
Merged with /trunk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2627
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     1
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     2
 COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     3
              All Rights Reserved
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     4
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     5
 This software is furnished under a license and may be used
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     6
 only in accordance with the terms of that license and with the
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     8
 be provided or otherwise made available to, or used by, any
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
     9
 other person.  No title to or ownership of the software is
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    10
 hereby transferred.
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    11
"
2717
dc997032a34e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2627
diff changeset
    12
"{ Package: 'stx:libtool' }"
dc997032a34e *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2627
diff changeset
    13
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    14
InspectorView subclass:#SetInspectorView
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:'keys'
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    18
	category:'Interface-Inspector'
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    19
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    20
794
b4b902784e00 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
    21
!SetInspectorView class methodsFor:'documentation'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    22
2627
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    23
copyright
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    24
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    25
 COPYRIGHT (c) 1996 by Claus Gittinger / eXept Software AG
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    26
              All Rights Reserved
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    27
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    28
 This software is furnished under a license and may be used
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    29
 only in accordance with the terms of that license and with the
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    31
 be provided or otherwise made available to, or used by, any
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    32
 other person.  No title to or ownership of the software is
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    33
 hereby transferred.
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    34
"
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    35
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    36
!
e633d9928ddd copyrights
Claus Gittinger <cg@exept.de>
parents: 2271
diff changeset
    37
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    38
documentation
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    39
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    40
    A modified inspector for Sets
510
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    41
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    42
    [author:]
6543e55fb227 documentation
Claus Gittinger <cg@exept.de>
parents: 370
diff changeset
    43
        Stefan Vogel
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    44
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    45
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    46
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    47
examples
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    48
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    49
    #(a b c d e) asSet inspect
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    50
"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    51
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    52
6491
d02c41c57d02 better menu
Claus Gittinger <cg@exept.de>
parents: 6324
diff changeset
    53
!SetInspectorView methodsFor:'menu'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    54
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    55
fieldMenu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    56
    <resource: #programMenu >
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    57
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    58
    |menu|
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    59
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    60
    menu := super fieldMenu.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    61
    menu addLabels:#(
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    62
                       '-'
3200
4889a13402db *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2717
diff changeset
    63
                       'Remove element'
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    64
                   )
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    65
         selectors:#(
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    66
                       nil 
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    67
                       doRemoveKey
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    68
                   ).
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    69
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
    70
    (self keyIndexForLine:selectionIndex) isNil ifTrue:[
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    71
        menu disableAll:#(doRemoveKey)
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    72
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    73
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    74
    ^ menu
1361
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    75
20c353524524 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 956
diff changeset
    76
    "Modified: / 29.10.1997 / 03:41:47 / cg"
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    77
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    78
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    79
!SetInspectorView methodsFor:'private'!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
    80
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    81
baseInspectedObjectClass
6324
29bf9ceffe8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
    82
    (inspectedObject class inheritsFrom:Set) ifFalse:[
29bf9ceffe8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
    83
        ^ Object
29bf9ceffe8f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 4095
diff changeset
    84
    ].
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    85
    ^ Set
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    86
!
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
    87
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    88
defaultLabel
4095
5bd36b14723d labels; added suppressPseudoVars & dereferenceValueHolders
Claus Gittinger <cg@exept.de>
parents: 3884
diff changeset
    89
    ^ 'Contents'
647
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    90
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    91
    "
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    92
     (Set with:1 with:2 with:3) inspect
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    93
    "
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    94
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    95
    "Modified: 28.6.1996 / 16:05:42 / cg"
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    96
!
1791ceddf2ef checkin from browser
Claus Gittinger <cg@exept.de>
parents: 645
diff changeset
    97
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
    98
derivedFields
7379
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
    99
    ^ Dictionary new
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
   100
        declareAllNewFrom:(super derivedFields ? #());
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
   101
        add:('-size' -> [ object size ]);
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
   102
        yourself
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   103
7379
55d5b77c7136 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6943
diff changeset
   104
    "Modified: / 09-10-2006 / 12:27:21 / cg"
6943
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   105
!
ba2398a0e68f *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6491
diff changeset
   106
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   107
indexList 
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   108
    "return a list of indexes to show in the selectionList.
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   109
     Set hasMore to true, if a '...' entry should be added."
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   110
8526
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   111
    inspectedObject size > nShown ifTrue:[
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   112
        |coll|
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   113
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   114
        coll := (SortedCollection new:nShown) sortBlock:[:a :b | a displayString < b displayString].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   115
        inspectedObject do:[:el |
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   116
            coll add:el.
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   117
            coll size >= nShown ifTrue:[ 
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   118
                hasMore := true.
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   119
                ^ coll
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   120
            ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   121
        ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   122
    ].
5ecd6ffcfa6c also show only the first nShown names;
Claus Gittinger <cg@exept.de>
parents: 7379
diff changeset
   123
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   124
    ^ inspectedObject asSortedCollection:[:a :b | a displayString < b displayString].
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   125
!
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   126
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   127
indexedFieldList 
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   128
    "return a list of indexed-variable names to show in the selectionList.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   129
     Set hasMore to true, if a '...' entry should be added."
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   130
3875
40e2e851a32c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3870
diff changeset
   131
    keys := self indexList.
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   132
    ^ keys collect:[:k | k isSymbol ifTrue:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   133
                             k printString
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   134
                         ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   135
                             k displayString
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   136
                         ]
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   137
                   ].
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   138
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   139
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   140
release 
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   141
    "release inspected object"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   142
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   143
    keys := nil.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   144
    super release
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   145
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   146
    "Created: 9.2.1996 / 12:04:30 / stefan"
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   147
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   148
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   149
showAllIndexedVarsInFieldList
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   150
    ^ false
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   151
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   152
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   153
!SetInspectorView methodsFor:'user interaction'!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   154
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   155
doRemoveKey
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   156
    "remove selected item from keys"
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   157
2192
c7bce869223c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2191
diff changeset
   158
    |key idx|
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   159
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   160
    idx := self keyIndexForLine:selectionIndex.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   161
    idx notNil ifTrue:[
2192
c7bce869223c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2191
diff changeset
   162
        key := keys at:idx.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   163
        (inspectedObject includes:key) ifTrue:[
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   164
            listView cursor:(Cursor wait).
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   165
            inspectedObject remove:key.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   166
            keys := nil.
2236
257f587ad7dc migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents: 2193
diff changeset
   167
            selectionIndex := selectedLine := nil.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   168
            inspectedObject changed.
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   169
            listView cursor:(Cursor hand).
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   170
            self reinspect.
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   171
        ].
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   172
    ]
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   173
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   174
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   175
!
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   176
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   177
indexedValueAtIndex:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   178
    ^ keys at:idx
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   179
!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   180
3884
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   181
indexedValueAtKey:idx
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   182
    ^ keys at:idx
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   183
!
4329e6c615a5 dont crash in set showing all indexed vars
james
parents: 3875
diff changeset
   184
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   185
valueAtLine:lineNr put:newValue
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   186
    "store newValue;
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   187
     For non-named instvars, we add the new value - ignoring the selection"
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   188
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   189
    |idx|
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   190
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   191
    idx := self instVarIndexForLine:selectionIndex.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   192
    idx notNil ifTrue:[
2271
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   193
        inspectedObject instVarAt:idx put:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   194
    ] ifFalse:[
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   195
        inspectedObject add:newValue.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   196
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   197
"/        inspectedObject changed.
0cf238543cb1 fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents: 2236
diff changeset
   198
        self reinspect.
2193
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   199
    ].
3d7b1044e8c8 fixed access to namedInstvars
Claus Gittinger <cg@exept.de>
parents: 2192
diff changeset
   200
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   201
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   202
! !
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   203
794
b4b902784e00 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 647
diff changeset
   204
!SetInspectorView class methodsFor:'documentation'!
370
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   205
7476940ca13f New SetInspectorView.
Stefan Vogel <sv@exept.de>
parents:
diff changeset
   206
version
12125
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   207
    ^ '$Header: /cvs/stx/stx/libtool/SetInspectorView.st,v 1.25 2009/02/02 16:51:35 cg Exp $'
0c49a3b13e43 Merged with /trunk
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 12123
diff changeset
   208
! !