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