method category rename
authorClaus Gittinger <cg@exept.de>
Wed, 07 May 2003 17:00:33 +0200
changeset 2501 832cbac295b8
parent 2500 1477b0a5a918
child 2502 051bafb8e06c
method category rename
ImageView.st
ListModelView.st
ProgressIndicator.st
SelectionInListModelView.st
SelectionInTreeView.st
TerminalView.st
TreeItem.st
--- a/ImageView.st	Wed May 07 16:56:39 2003 +0200
+++ b/ImageView.st	Wed May 07 17:00:33 2003 +0200
@@ -441,7 +441,7 @@
     super sizeChanged:how
 ! !
 
-!ImageView methodsFor:'initialize / release'!
+!ImageView methodsFor:'initialization & release'!
 
 destroy
     image := nil.
@@ -467,7 +467,7 @@
 !ImageView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.54 2002-12-10 11:05:01 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageView.st,v 1.55 2003-05-07 14:59:47 cg Exp $'
 ! !
 
 ImageView initialize!
--- a/ListModelView.st	Wed May 07 16:56:39 2003 +0200
+++ b/ListModelView.st	Wed May 07 17:00:33 2003 +0200
@@ -932,7 +932,7 @@
 
 ! !
 
-!ListModelView methodsFor:'initialize / release'!
+!ListModelView methodsFor:'initialization & release'!
 
 create
     "fetch device dependent resources
@@ -1652,7 +1652,7 @@
 !ListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.77 2003-04-25 00:08:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ListModelView.st,v 1.78 2003-05-07 14:59:52 cg Exp $'
 ! !
 
 ListModelView initialize!
--- a/ProgressIndicator.st	Wed May 07 16:56:39 2003 +0200
+++ b/ProgressIndicator.st	Wed May 07 17:00:33 2003 +0200
@@ -820,7 +820,7 @@
     "Modified: / 18.4.1998 / 14:09:40 / cg"
 ! !
 
-!ProgressIndicator methodsFor:'initialize / release'!
+!ProgressIndicator methodsFor:'initialization & release'!
 
 destroy
     busyIndicationProcess notNil ifTrue:[
@@ -1036,5 +1036,5 @@
 !ProgressIndicator class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.43 2003-02-07 14:15:32 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ProgressIndicator.st,v 1.44 2003-05-07 14:59:35 cg Exp $'
 ! !
--- a/SelectionInListModelView.st	Wed May 07 16:56:39 2003 +0200
+++ b/SelectionInListModelView.st	Wed May 07 17:00:33 2003 +0200
@@ -1671,7 +1671,7 @@
     ^ false
 ! !
 
-!SelectionInListModelView methodsFor:'initialize / release'!
+!SelectionInListModelView methodsFor:'initialization & release'!
 
 fetchResources
     "fetch device colors and ..., to avoid reallocation at redraw time;
@@ -2277,5 +2277,5 @@
 !SelectionInListModelView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.84 2003-05-07 14:06:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInListModelView.st,v 1.85 2003-05-07 14:59:59 cg Exp $'
 ! !
--- a/SelectionInTreeView.st	Wed May 07 16:56:39 2003 +0200
+++ b/SelectionInTreeView.st	Wed May 07 17:00:33 2003 +0200
@@ -1479,7 +1479,7 @@
     ^ super keyPress:key x:x y:y
 ! !
 
-!SelectionInTreeView methodsFor:'initialize / release'!
+!SelectionInTreeView methodsFor:'initialization & release'!
 
 create
     super create.
@@ -2477,5 +2477,5 @@
 !SelectionInTreeView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.102 2003-05-07 14:11:27 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/SelectionInTreeView.st,v 1.103 2003-05-07 15:00:33 cg Exp $'
 ! !
--- a/TerminalView.st	Wed May 07 16:56:39 2003 +0200
+++ b/TerminalView.st	Wed May 07 17:00:33 2003 +0200
@@ -928,187 +928,7 @@
     "Modified: / 20.6.1998 / 20:30:34 / cg"
 ! !
 
-!TerminalView methodsFor:'initialization-shell'!
-
-startCommand:aCommand
-    "start a command on a pseudo terminal. If the command arg is nil,
-     a shell is started. The command is started in the current directory.
-     Also fork a reader process, to read the shells output and
-     tell me, whenever something arrives"
-
-    ^ self startCommand:aCommand in:nil
-
-    "Modified: / 20.7.1998 / 18:30:24 / cg"
-!
-
-startCommand:aCommand in:aDirectory
-    "start a command on a pseudo terminal. If the command arg is nil,
-     a shell is started. If aDirectory is not nil, the command is
-     executed in that directory.
-     Also fork a reader process, to read the shells output and
-     tell me, whenever something arrives"
-
-    |pty slaveFD execFdArray blocked exitStatus 
-     stxToCommandPipe commandToStxPipe cmd shell args env shellAndArgs|
-
-    shellCommand := aCommand.
-    shellDirectory := aDirectory.
-
-    self create.  "/ need my windowID (to pass down in environment)
-
-    OperatingSystem isMSWINDOWSlike ifTrue:[
-        "use two pipes to COMMAND.COM"
-        stxToCommandPipe := ExternalStream makePipe.
-        stxToCommandPipe isNil ifTrue:[
-            ^ self warn:'Could not create pipe to COMMAND.COM.'.
-        ].
-
-        commandToStxPipe := ExternalStream makePipe.
-        commandToStxPipe isNil ifTrue:[
-            ^ self warn:'Could not create pipe from COMMAND.COM.'.
-        ].
-
-        "/ pipe readSide is p at:1;
-        "/      writeSide is p at:2
-
-        slaveFD := (commandToStxPipe at:2) fileDescriptor.
-        execFdArray := Array 
-                         with:(stxToCommandPipe at:1) fileDescriptor        "stdin"
-                         with:slaveFD                                       "stdout"
-                         with:slaveFD.                                      "stderr"
-
-        outStream := commandToStxPipe at:1.
-        inStream  := stxToCommandPipe at:2.
-        outStream buffered:false.
-        inStream buffered:false.
-
-        shellAndArgs := OperatingSystem commandAndArgsForOSCommand:aCommand.
-        shell := shellAndArgs at:1.
-        args  := (shellAndArgs at:2) ? ''.
-    ] ifFalse:[
-        "Use a pseudo-tty"
-        pty := ExternalStream makePTYPair.
-        pty isNil ifTrue:[
-            self warn:'Cannot open pty.'.
-            ^ self.
-        ].
-
-        "/ pty at:1 is the master;
-        "/ pty at:2 is the slave
-        inStream := outStream := (pty at:1).
-        inStream buffered:false.
-
-        self defineWindowSize.
-        "/ fork a shell process on the slave-side
-        slaveFD := (pty at:2) fileDescriptor.
-        execFdArray := Array with:slaveFD with:slaveFD with:slaveFD.
-
-        aCommand isNil ifTrue:[
-            shell := OperatingSystem getEnvironment:'SHELL'.
-            shell size == 0 ifTrue:[
-                shell := '/bin/sh'.
-            ].
-            cmd := shell asFilename baseName.
-            args := (Array with:cmd).
-        ] ifFalse:[
-            shell := '/bin/sh'.
-            args := (Array with:'sh' with:'-c' with:aCommand).
-        ].
-        env := Dictionary new.
-        env at:'SHELL'    put:shell.
-        env at:'TERM'     put:(self terminalType).
-        env at:'LINES'    put:(numberOfLines printString).
-        env at:'COLUMNS'  put:(numberOfColumns printString).
-        (device platformName = 'X11' and:[drawableId notNil]) ifTrue:[
-            env at:'WINDOWID' put:(drawableId address printString).
-        ].
-    ].
-
-    blocked := OperatingSystem blockInterrupts.
-
-    shellPid := Processor
-               monitor:[
-                  OperatingSystem
-                      exec:shell
-                      withArguments:args
-                      environment:env
-                      fileDescriptors:execFdArray
-                      fork:true
-                      newPgrp:true
-                      inDirectory:aDirectory.
-               ]
-               action:[:status |
-                    Debug ifTrue:[
-                        Transcript show:'pid:'; showCR:status pid.
-                        Transcript show:'status:'; showCR:status status.
-                        Transcript show:'code:'; showCR:status code.
-                        Transcript show:'core:'; showCR:status core.
-                    ].
-                    status stillAlive ifFalse:[
-                        exitStatus := status.
-                        OperatingSystem closePid:shellPid.
-                        shellPid := nil.
-                        self pushEvent:#shellTerminated
-                    ].
-               ].
-
-    blocked ifFalse:[
-        OperatingSystem unblockInterrupts
-    ].
-
-    "close the slave side of the pty/pipes (only used by the child)"
-    pty notNil ifTrue:[
-        (pty at:2) close.
-    ].
-
-    commandToStxPipe notNil ifTrue:[
-        (commandToStxPipe at:2) close.
-        (stxToCommandPipe at:1) close.
-    ].
-
-    shellPid isNil ifTrue:[
-        self warn:'Cannot start shell'.
-        outStream close.
-        inStream close.
-        inStream := outStream := nil.
-        ^ self.
-    ].
-
-    self startReaderProcess.
-
-    "Created: / 20.7.1998 / 18:19:32 / cg"
-    "Modified: / 5.5.1999 / 17:28:37 / cg"
-!
-
-startShell
-    "start a shell on a pseudo terminal in the current directory.
-     Also fork a reader process, to read the shells output and
-     tell me, whenever something arrives"
-
-    ^ self startCommand:nil
-
-    "
-     VT100TerminalView openShell
-    "
-
-    "Modified: / 20.7.1998 / 18:29:54 / cg"
-!
-
-startShellIn:aDirectory
-    "start a shell on a pseudo terminal in some directory.
-     Also fork a reader process, to read the shells output and
-     tell me, whenever something arrives"
-
-    ^ self startCommand:nil in:aDirectory
-
-    "
-     VT100TerminalView openShellIn:'/etc'
-    "
-
-    "Modified: / 20.7.1998 / 18:29:46 / cg"
-! !
-
-!TerminalView methodsFor:'initialize / release'!
+!TerminalView methodsFor:'initialization & release'!
 
 closeDownShell
     "shut down my shell process and stop the background reader thread."
@@ -1417,6 +1237,186 @@
     "Modified: / 21.7.1998 / 19:00:13 / cg"
 ! !
 
+!TerminalView methodsFor:'initialization-shell'!
+
+startCommand:aCommand
+    "start a command on a pseudo terminal. If the command arg is nil,
+     a shell is started. The command is started in the current directory.
+     Also fork a reader process, to read the shells output and
+     tell me, whenever something arrives"
+
+    ^ self startCommand:aCommand in:nil
+
+    "Modified: / 20.7.1998 / 18:30:24 / cg"
+!
+
+startCommand:aCommand in:aDirectory
+    "start a command on a pseudo terminal. If the command arg is nil,
+     a shell is started. If aDirectory is not nil, the command is
+     executed in that directory.
+     Also fork a reader process, to read the shells output and
+     tell me, whenever something arrives"
+
+    |pty slaveFD execFdArray blocked exitStatus 
+     stxToCommandPipe commandToStxPipe cmd shell args env shellAndArgs|
+
+    shellCommand := aCommand.
+    shellDirectory := aDirectory.
+
+    self create.  "/ need my windowID (to pass down in environment)
+
+    OperatingSystem isMSWINDOWSlike ifTrue:[
+        "use two pipes to COMMAND.COM"
+        stxToCommandPipe := ExternalStream makePipe.
+        stxToCommandPipe isNil ifTrue:[
+            ^ self warn:'Could not create pipe to COMMAND.COM.'.
+        ].
+
+        commandToStxPipe := ExternalStream makePipe.
+        commandToStxPipe isNil ifTrue:[
+            ^ self warn:'Could not create pipe from COMMAND.COM.'.
+        ].
+
+        "/ pipe readSide is p at:1;
+        "/      writeSide is p at:2
+
+        slaveFD := (commandToStxPipe at:2) fileDescriptor.
+        execFdArray := Array 
+                         with:(stxToCommandPipe at:1) fileDescriptor        "stdin"
+                         with:slaveFD                                       "stdout"
+                         with:slaveFD.                                      "stderr"
+
+        outStream := commandToStxPipe at:1.
+        inStream  := stxToCommandPipe at:2.
+        outStream buffered:false.
+        inStream buffered:false.
+
+        shellAndArgs := OperatingSystem commandAndArgsForOSCommand:aCommand.
+        shell := shellAndArgs at:1.
+        args  := (shellAndArgs at:2) ? ''.
+    ] ifFalse:[
+        "Use a pseudo-tty"
+        pty := ExternalStream makePTYPair.
+        pty isNil ifTrue:[
+            self warn:'Cannot open pty.'.
+            ^ self.
+        ].
+
+        "/ pty at:1 is the master;
+        "/ pty at:2 is the slave
+        inStream := outStream := (pty at:1).
+        inStream buffered:false.
+
+        self defineWindowSize.
+        "/ fork a shell process on the slave-side
+        slaveFD := (pty at:2) fileDescriptor.
+        execFdArray := Array with:slaveFD with:slaveFD with:slaveFD.
+
+        aCommand isNil ifTrue:[
+            shell := OperatingSystem getEnvironment:'SHELL'.
+            shell size == 0 ifTrue:[
+                shell := '/bin/sh'.
+            ].
+            cmd := shell asFilename baseName.
+            args := (Array with:cmd).
+        ] ifFalse:[
+            shell := '/bin/sh'.
+            args := (Array with:'sh' with:'-c' with:aCommand).
+        ].
+        env := Dictionary new.
+        env at:'SHELL'    put:shell.
+        env at:'TERM'     put:(self terminalType).
+        env at:'LINES'    put:(numberOfLines printString).
+        env at:'COLUMNS'  put:(numberOfColumns printString).
+        (device platformName = 'X11' and:[drawableId notNil]) ifTrue:[
+            env at:'WINDOWID' put:(drawableId address printString).
+        ].
+    ].
+
+    blocked := OperatingSystem blockInterrupts.
+
+    shellPid := Processor
+               monitor:[
+                  OperatingSystem
+                      exec:shell
+                      withArguments:args
+                      environment:env
+                      fileDescriptors:execFdArray
+                      fork:true
+                      newPgrp:true
+                      inDirectory:aDirectory.
+               ]
+               action:[:status |
+                    Debug ifTrue:[
+                        Transcript show:'pid:'; showCR:status pid.
+                        Transcript show:'status:'; showCR:status status.
+                        Transcript show:'code:'; showCR:status code.
+                        Transcript show:'core:'; showCR:status core.
+                    ].
+                    status stillAlive ifFalse:[
+                        exitStatus := status.
+                        OperatingSystem closePid:shellPid.
+                        shellPid := nil.
+                        self pushEvent:#shellTerminated
+                    ].
+               ].
+
+    blocked ifFalse:[
+        OperatingSystem unblockInterrupts
+    ].
+
+    "close the slave side of the pty/pipes (only used by the child)"
+    pty notNil ifTrue:[
+        (pty at:2) close.
+    ].
+
+    commandToStxPipe notNil ifTrue:[
+        (commandToStxPipe at:2) close.
+        (stxToCommandPipe at:1) close.
+    ].
+
+    shellPid isNil ifTrue:[
+        self warn:'Cannot start shell'.
+        outStream close.
+        inStream close.
+        inStream := outStream := nil.
+        ^ self.
+    ].
+
+    self startReaderProcess.
+
+    "Created: / 20.7.1998 / 18:19:32 / cg"
+    "Modified: / 5.5.1999 / 17:28:37 / cg"
+!
+
+startShell
+    "start a shell on a pseudo terminal in the current directory.
+     Also fork a reader process, to read the shells output and
+     tell me, whenever something arrives"
+
+    ^ self startCommand:nil
+
+    "
+     VT100TerminalView openShell
+    "
+
+    "Modified: / 20.7.1998 / 18:29:54 / cg"
+!
+
+startShellIn:aDirectory
+    "start a shell on a pseudo terminal in some directory.
+     Also fork a reader process, to read the shells output and
+     tell me, whenever something arrives"
+
+    ^ self startCommand:nil in:aDirectory
+
+    "
+     VT100TerminalView openShellIn:'/etc'
+    "
+
+    "Modified: / 20.7.1998 / 18:29:46 / cg"
+! !
+
 !TerminalView methodsFor:'menu'!
 
 doReset
@@ -1819,7 +1819,7 @@
 !TerminalView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.114 2003-05-07 14:45:31 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/TerminalView.st,v 1.115 2003-05-07 15:00:20 cg Exp $'
 ! !
 
 TerminalView initialize!
--- a/TreeItem.st	Wed May 07 16:56:39 2003 +0200
+++ b/TreeItem.st	Wed May 07 17:00:33 2003 +0200
@@ -662,7 +662,7 @@
 
 ! !
 
-!TreeItem methodsFor:'initialize-release'!
+!TreeItem methodsFor:'initialization & release'!
 
 initialize
     "setup defaults
@@ -1035,7 +1035,7 @@
 !TreeItem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/TreeItem.st,v 1.43 2003-05-07 14:44:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/TreeItem.st,v 1.44 2003-05-07 15:00:21 cg Exp $'
 ! !
 
 TreeItem initialize!