Hi,
I use tcl on unix at work (never used tk) but wanted to do some other projects at home, and i use mac
and since mac has tcl/tk built-in I can run my tcl programs from the mac terminal.
My question is,
when I do the fallowing in my terminal window
% wish
% button .hello -text "my name is trtcl"
.hello
% pack .hello
a window pops up with "my name is trtcl"
but when i insert the fallowing lines in a .tcl file and run it I get the fallowing error message "invalid command name "label"
#!/bin/sh
exec wish "$0" "$@"
label .hello -text "my name is trtcl"
pack .hello
So what is the correct way to have the tk lines in a file ? or what I am doing wrong ?
Thanks in advance
I use tcl on unix at work (never used tk) but wanted to do some other projects at home, and i use mac
and since mac has tcl/tk built-in I can run my tcl programs from the mac terminal.
My question is,
when I do the fallowing in my terminal window
% wish
% button .hello -text "my name is trtcl"
.hello
% pack .hello
a window pops up with "my name is trtcl"
but when i insert the fallowing lines in a .tcl file and run it I get the fallowing error message "invalid command name "label"
#!/bin/sh
exec wish "$0" "$@"
label .hello -text "my name is trtcl"
pack .hello
So what is the correct way to have the tk lines in a file ? or what I am doing wrong ?
Thanks in advance