Hello all.
I've just started learning the tk/tcl/wish combo this hour and would like a little help setting up my system.
Everything works as far as launching (wish/tclsh), but the only scripts I can get to work properly are those that launch wish into an X window.
I need some help with the scripts that pass text along to the terminal.
Here's the header I use to create a tcl script to successfully launch and display code in the X window:
This works, but I can't figure out why anytime I try to do a terminal only script, I'll get something like this:
Thanks.
I've just started learning the tk/tcl/wish combo this hour and would like a little help setting up my system.
Everything works as far as launching (wish/tclsh), but the only scripts I can get to work properly are those that launch wish into an X window.
I need some help with the scripts that pass text along to the terminal.
Here's the header I use to create a tcl script to successfully launch and display code in the X window:
Code:
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" ${1+"$@"}
# tcl script follows
button .b -text "Hello, world!" -command exit
pack .b
This works, but I can't figure out why anytime I try to do a terminal only script, I'll get something like this:
Code:
% ./EchoArgs.tcl 1 2 3
./EchoArgs.tcl: line 1: puts: command not found
./EchoArgs.tcl: line 2: puts: command not found
./EchoArgs.tcl: line 4: foreach: command not found
./EchoArgs.tcl: line 5: puts: command not found
./EchoArgs.tcl: line 6: incri: command not found
./EchoArgs.tcl: line 7: syntax error near unexpected token `}'
./EchoArgs.tcl: line 7: `}'
child process exited abnormally
Thanks.