Since you have talked about tkemc I'll assume that you are running an
EMC2 install on the computer you are attempting to run this new
program.
I had to make a few changes in order to get your program to run. Put
the following program in a text file, make that file executable and then
ask Linux to run it.
#!/bin/sh
# the next line restarts using wish \
exec wish "$0" "$@"
button .hello -text Hello \
-command {puts stdout "Hello, World!"}
pack .hello -padx 20 -pady 10
Here is the output of my terminal when I changed the file permissions
and ran the test. The file was named binhtcl
r...@rayh-a64:~$ cd Desktop/
r...@rayh-a64:~/Desktop$ chmod a+x binhtcl
r...@rayh-a64:~/Desktop$ ./binhtcl
Hello, World!
The Tcl/Tk shell is named "wish." That is why you need to start it
first in the script. That is what the first three lines do. Then when
it is started it will read and execute the rest of the lines following
it.
I also removed the empty lines. You can have empty lines but they must
not interrupt a logical set of operations like the definition of the
button .hello. If you don't remove that extra empty line you will see
an error message like this.
r...@rayh-a64:~/Desktop$ ./binhtcl
Error in startup script: invalid command name "-command"
while executing
"-command {puts stdout "Hello, World!"}"
(file "./binhtcl" line 6)
You see, the forward slash (/) only shifts execution to the next line by
appending it to the previous.
Hope this helps.
Rayh
Try this http://www.tcl.tk/man/tcl8.5/tutorial/tcltutorial.html
On Mon, 2010-03-22 at 10:21 -0400, Binh Hoang wrote:
> #!/usr/local/bin/wish
>
> button .hello -text Hello \
>
> -command {puts stdout "Hello, World!"}
>
> pack .hello -padx 20 -pady 10
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users