ShellView.st
changeset 757 d28fb65967a9
parent 643 d6e1a9fced34
child 762 ba7c3153f9d1
equal deleted inserted replaced
756:52a76ec8828d 757:d28fb65967a9
    47 ! !
    47 ! !
    48 
    48 
    49 !ShellView class methodsFor:'interface specs'!
    49 !ShellView class methodsFor:'interface specs'!
    50 
    50 
    51 windowSpec
    51 windowSpec
    52     "this window spec was automatically generated by the ST/X UIPainter"
    52     "This resource specification was automatically generated
    53 
    53      by the UIPainter of ST/X."
    54     "do not manually edit this - the painter/builder may not be able to
    54 
    55      handle the specification if its corrupted."
    55     "Do not manually edit this!! If it is corrupted,
       
    56      the UIPainter may not be able to read the specification."
    56 
    57 
    57     "
    58     "
    58      UIPainter new openOnClass:ShellView andSelector:#windowSpec
    59      UIPainter new openOnClass:ShellView andSelector:#windowSpec
    59      ShellView new openInterface:#windowSpec
    60      ShellView new openInterface:#windowSpec
       
    61      ShellView open
    60     "
    62     "
    61     "ShellView open"
       
    62 
    63 
    63     <resource: #canvas>
    64     <resource: #canvas>
    64 
    65 
    65     ^
    66     ^
    66      
    67      
    67        #(#FullSpec
    68        #(#FullSpec
    68           #'window:' 
    69           #window: 
    69            #(#WindowSpec
    70            #(#WindowSpec
    70               #'name:' 'unnamed canvas'
    71               #name: 'unnamed canvas'
    71               #'layout:' #(#LayoutFrame 197 0 172 0 496 0 440 0)
    72               #layout: #(#LayoutFrame 252 0 229 0 551 0 497 0)
    72               #'label:' 'unnamed canvas'
    73               #label: 'unnamed canvas'
    73               #'min:' #(#Point 10 10)
    74               #min: #(#Point 10 10)
    74               #'max:' #(#Point 1152 864)
    75               #max: #(#Point 1152 864)
    75               #'bounds:' #(#Rectangle 197 172 497 441)
    76               #bounds: #(#Rectangle 252 229 552 498)
    76               #'usePreferredExtent:' false
    77               #usePreferredExtent: false
    77           )
    78           )
    78           #'component:' 
    79           #component: 
    79            #(#SpecCollection
    80            #(#SpecCollection
    80               #'collection:' 
    81               #collection: 
    81                #(
    82                #(
    82                  #(#TextEditorSpec
    83                  #(#TextEditorSpec
    83                     #'name:' 'fileContentsView'
    84                     #name: 'fileContentsView'
    84                     #'layout:' #(#LayoutFrame 0 0 0 0.0 0 1 -22 1)
    85                     #layout: #(#LayoutFrame 0 0 0 0.0 0 1 -22 1)
    85                     #'model:' #valueOfFileContents
    86                     #model: #valueOfFileContents
    86                     #'hasHorizontalScrollBar:' true
    87                     #hasHorizontalScrollBar: true
    87                     #'hasVerticalScrollBar:' true
    88                     #hasVerticalScrollBar: true
    88                     #'miniScrollerHorizontal:' true
    89                     #miniScrollerHorizontal: true
    89                 )
    90                 )
    90                  #(#SequenceViewSpec
    91                  #(#SequenceViewSpec
    91                     #'name:' 'shellOutputView'
    92                     #name: 'shellOutputView'
    92                     #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -22 1.0)
    93                     #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -22 1.0)
    93                     #'model:' #selectionOfShellOutput
    94                     #model: #selectionOfShellOutput
    94                     #'style:' #(#FontDescription #courier #medium #roman 12)
    95                     #style: #(#FontDescription #courier #medium #roman 12)
    95                     #'hasHorizontalScrollBar:' true
    96                     #hasHorizontalScrollBar: true
    96                     #'hasVerticalScrollBar:' true
    97                     #hasVerticalScrollBar: true
    97                     #'miniScrollerHorizontal:' true
    98                     #doubleClickSelector: #listDoubleClicked:
    98                     #'doubleClickSelector:' #'listDoubleClicked:'
    99                     #useIndex: true
    99                     #'useIndex:' true
   100                     #sequenceList: #listOfShellOutput
   100                     #'sequenceList:' #listOfShellOutput
       
   101                 )
   101                 )
   102                  #(#ActionButtonSpec
   102                  #(#ActionButtonSpec
   103                     #'name:' 'fileNameButton'
   103                     #name: 'fileNameButton'
   104                     #'layout:' #(#LayoutFrame 0 0.0 -22 1 -60 1.0 0 1.0)
   104                     #layout: #(#LayoutFrame 0 0.0 -22 1 -60 1.0 0 1.0)
   105                     #'model:' #toggleViews
   105                     #model: #toggleViews
   106                 )
   106                 )
   107                  #(#ActionButtonSpec
   107                  #(#ActionButtonSpec
   108                     #'name:' 'saveButton'
   108                     #name: 'saveButton'
   109                     #'layout:' #(#LayoutFrame -60 1 -22 1 0 1.0 0 1.0)
   109                     #layout: #(#LayoutFrame -60 1 -22 1 0 1.0 0 1.0)
   110                     #'label:' 'Save'
   110                     #label: 'Save'
   111                     #'model:' #saveFileContents
   111                     #model: #saveFileContents
   112                 )
   112                 )
   113                  #(#ActionButtonSpec
   113                  #(#ActionButtonSpec
   114                     #'name:' 'stopButton'
   114                     #name: 'stopButton'
   115                     #'layout:' #(#LayoutFrame 0 0 -22 1 0 1.0 0 1)
   115                     #layout: #(#LayoutFrame 0 0 -22 1 0 1.0 0 1)
   116                     #'label:' 'Stop'
   116                     #label: 'Stop'
   117                     #'model:' #terminateTask
   117                     #model: #terminateTask
   118                 )
   118                 )
   119                  #(#InputFieldSpec
   119                  #(#InputFieldSpec
   120                     #'name:' 'commandInputField'
   120                     #name: 'commandInputField'
   121                     #'layout:' #(#LayoutFrame 0 0 -22 1 0 1.0 0 1)
   121                     #layout: #(#LayoutFrame 0 0 -22 1 0 1.0 0 1)
   122                     #'model:' #valueOfCommand
   122                     #model: #valueOfCommand
   123                     #'type:' #string
   123                     #type: #string
   124                     #'acceptOnReturn:' false
   124                     #acceptOnReturn: false
   125                     #'acceptOnTab:' false
   125                     #acceptOnTab: false
   126                 )
   126                 )
   127               )
   127               )
   128           )
   128           )
   129       )
   129       )
   130 ! !
   130 ! !
   187 
   187 
   188 executeCommand: aCommand
   188 executeCommand: aCommand
   189 
   189 
   190     |s|       
   190     |s|       
   191     aCommand isNil | task notNil | directory isNil ifTrue: [^nil].
   191     aCommand isNil | task notNil | directory isNil ifTrue: [^nil].
       
   192     aCommand isString ifTrue: [^self executeCommands: (Array with: aCommand)].
   192     aCommand key size = 0 ifTrue: [^aCommand key: ''].
   193     aCommand key size = 0 ifTrue: [^aCommand key: ''].
   193 
   194 
   194     self valueOfCommand value: ''.
   195     self valueOfCommand value: ''.
   195     self listOfShellOutput
   196     self listOfShellOutput
   196         at: self listOfShellOutput size
   197         at: self listOfShellOutput size