Hello,
I'm getting an invalid command name error in the following script running in ActiveState Wish.
The script is simply,
#!/usr/bin/wish
tk_messageBox -default "ok" -message "this works";
usermessage "but this doesn't!";
proc usermessage {themessage} {
tk_messageBox -default "ok" -message $themessage;
}
The direct tk_messageBox call works fine but executing the usermessage command produces the error, invalid command name "usermessage".
This script is so simple that I'm beside myself in trying to figure out what's wrong. I'm doing my first tcl program/script after reading about half of Nadkarni's book. Things were working fine yesterday. I have a GUI, I'm doing lots of processing and math and stuff. Then I encountered this problem so I created this short little script (above) to try to isolate things. Anyone have any idea what I'm doing wrong here? I've attached the actual tcl file that I'm loading into the Wish console. Thanks.
I'm getting an invalid command name error in the following script running in ActiveState Wish.
The script is simply,
#!/usr/bin/wish
tk_messageBox -default "ok" -message "this works";
usermessage "but this doesn't!";
proc usermessage {themessage} {
tk_messageBox -default "ok" -message $themessage;
}
The direct tk_messageBox call works fine but executing the usermessage command produces the error, invalid command name "usermessage".
This script is so simple that I'm beside myself in trying to figure out what's wrong. I'm doing my first tcl program/script after reading about half of Nadkarni's book. Things were working fine yesterday. I have a GUI, I'm doing lots of processing and math and stuff. Then I encountered this problem so I created this short little script (above) to try to isolate things. Anyone have any idea what I'm doing wrong here? I've attached the actual tcl file that I'm loading into the Wish console. Thanks.