OrderedCollectionInspectorView.st
changeset 473 5435d56402db
parent 200 01ce3d3636d5
child 510 6543e55fb227
equal deleted inserted replaced
472:7e2d83585ed7 473:5435d56402db
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
    13 InspectorView subclass:#OrderedCollectionInspectorView
    13 InspectorView subclass:#OrderedCollectionInspectorView
    14 	 instanceVariableNames:''
    14 	instanceVariableNames:''
    15 	 classVariableNames:''
    15 	classVariableNames:''
    16 	 poolDictionaries:''
    16 	poolDictionaries:''
    17 	 category:'Interface-Inspector'
    17 	category:'Interface-Inspector'
    18 !
    18 !
    19 
    19 
    20 !OrderedCollectionInspectorView class methodsFor:'documentation'!
    20 !OrderedCollectionInspectorView class methodsFor:'documentation'!
    21 
    21 
    22 copyright
    22 copyright
    29  inclusion of the above copyright notice.   This software may not
    29  inclusion of the above copyright notice.   This software may not
    30  be provided or otherwise made available to, or used by, any
    30  be provided or otherwise made available to, or used by, any
    31  other person.  No title to or ownership of the software is
    31  other person.  No title to or ownership of the software is
    32  hereby transferred.
    32  hereby transferred.
    33 "
    33 "
       
    34 !
       
    35 
       
    36 documentation
       
    37 "
       
    38     a modified Inspector for orderedCollections
       
    39 "
       
    40 
    34 ! !
    41 ! !
    35 
    42 
    36 !OrderedCollectionInspectorView methodsFor:'private'!
    43 !OrderedCollectionInspectorView methodsFor:'private'!
    37 
    44 
    38 fieldList 
    45 fieldList 
    53     ].
    60     ].
    54     ^ aList
    61     ^ aList
    55 !
    62 !
    56 
    63 
    57 fieldMenu
    64 fieldMenu
    58     |labels selectors|
    65     |labels selectors m|
    59 
    66 
    60     hasMore ifTrue:[
    67     hasMore ifTrue:[
    61 	labels := #(
    68         labels := #(
    62 		      'inspect'
    69                       'inspect'
    63 		      'basicInspect'
    70                       'basicInspect'
    64 		      '-'
    71                       '-'
    65 		      'remove'
    72                       'browse'
    66 		      '-'
    73                       'browse class hierarchy'
    67 		      'show more'
    74                       'browse full class protocol'
    68 		   ).
    75                       '-'
    69 
    76                       'remove'
    70 	selectors := #(
    77                       '-'
    71 		      doInspect 
    78                       'show more'
    72 		      doBasicInspect 
    79                    ).
    73 		      nil 
    80 
    74 		      removeIndex
    81         selectors := #(
    75 		      nil 
    82                       doInspect 
    76 		      showMore
    83                       doBasicInspect 
    77 		      ).
    84                       nil 
       
    85                       browse
       
    86                       browseClassHierarchy
       
    87                       browseFullClassProtocol
       
    88                       nil 
       
    89                       removeIndex
       
    90                       nil 
       
    91                       showMore
       
    92                       ).
    78     ] ifFalse:[
    93     ] ifFalse:[
    79 	labels := #(
    94         labels := #(
    80 		      'inspect'
    95                       'inspect'
    81 		      'basicInspect'
    96                       'basicInspect'
    82 		      '-'
    97                       '-'
    83 		      'remove'
    98                       'browse'
       
    99                       'browse class hierarchy'
       
   100                       'browse full class protocol'
       
   101                       '-'
       
   102                       'remove'
    84 "/                      '-'
   103 "/                      '-'
    85 "/                      'owners'
   104 "/                      'owners'
    86 		   ).
   105                    ).
    87 
   106 
    88 	selectors := #(
   107         selectors := #(
    89 		      doInspect 
   108                       doInspect 
    90 		      doBasicInspect 
   109                       doBasicInspect 
    91 		      nil 
   110                       nil 
    92 		      removeIndex
   111                       browse
       
   112                       browseClassHierarchy
       
   113                       browseFullClassProtocol
       
   114                       nil 
       
   115                       removeIndex
    93 "/                      nil
   116 "/                      nil
    94 "/                      inspectOwners
   117 "/                      inspectOwners
    95 		      ).
   118                       ).
    96     ].
   119 
    97 
   120     ].
    98     ^ PopUpMenu
   121 
    99 	  labels:(resources array:labels)
   122     monitorProcess isNil ifTrue:[
   100 	  selectors:selectors
   123         labels := labels , #('-' 'start monitor').
       
   124         selectors := selectors , #(nil #doStartMonitor).
       
   125     ] ifFalse:[
       
   126         labels := labels , #('-' 'stop monitor').
       
   127         selectors := selectors , #(nil #doStopMonitor).
       
   128     ].
       
   129 
       
   130     m := PopUpMenu
       
   131           labels:(resources array:labels)
       
   132           selectors:selectors.
       
   133 
       
   134     selectedLine isNil ifTrue:[
       
   135         m disableAll:#(doInspect doBasicInspect 
       
   136                        browse browseClassHierarchy browseFullClassProtocol
       
   137                        doStartMonitor removeIndex)
       
   138     ] ifFalse:[
       
   139         selectedLine == 1 ifTrue:[
       
   140             m disable:#removeIndex
       
   141         ]
       
   142     ].
       
   143 
       
   144     ^ m
       
   145 
       
   146     "Modified: 12.4.1996 / 14:04:40 / cg"
   101 ! !
   147 ! !
   102 
   148 
   103 !OrderedCollectionInspectorView methodsFor:'user interaction'!
   149 !OrderedCollectionInspectorView methodsFor:'user interaction'!
   104 
   150 
   105 doAccept:theText
   151 doAccept:theText
   154 ! !
   200 ! !
   155 
   201 
   156 !OrderedCollectionInspectorView class methodsFor:'documentation'!
   202 !OrderedCollectionInspectorView class methodsFor:'documentation'!
   157 
   203 
   158 version
   204 version
   159     ^ '$Header: /cvs/stx/stx/libtool/OrderedCollectionInspectorView.st,v 1.12 1995-11-23 17:44:07 cg Exp $'
   205     ^ '$Header: /cvs/stx/stx/libtool/OrderedCollectionInspectorView.st,v 1.13 1996-04-12 16:41:35 cg Exp $'
   160 ! !
   206 ! !