home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
otshvscmdh.tcl
< prev
next >
Wrap
Text File
|
1997-05-21
|
2KB
|
73 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)otshvscmdh.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)otshvscmdh.tcl /main/titanic/3 21 May 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require_module_file "vscmdhandl.tcl" vcm
# Command handler for commands executed in otsh.
Class OtshVSCmdHandler : {VSCmdHandler} {
constructor
method destructor
method execute
method executeSilent
method error
}
constructor OtshVSCmdHandler {class this name} {
set this [VSCmdHandler::constructor $class $this $name]
# Start constructor user section
# End constructor user section
return $this
}
method OtshVSCmdHandler::destructor {this} {
# Start destructor user section
# End destructor user section
$this VSCmdHandler::destructor
}
# Execute the given command, send errors to stderr, all other output to stdout.
# Return 0 if there were errors, 1 otherwise.
#
method OtshVSCmdHandler::execute {this command} {
$command execute 0
if { [$command errors] != "" } {
puts stderr [$command errors]
return 0
}
if { [$command output] != "" } {
puts stdout [$command output]
}
return 1
}
method OtshVSCmdHandler::executeSilent {this command} {
$command execute 0
if { [$command errors] != "" } {
puts stderr [$command errors]
return 0
}
return 1
}
method OtshVSCmdHandler::error {this message} {
puts stderr $message
}
# Do not delete this line -- regeneration end marker