Re: Launching Tkcon with a main script and another as arguments
- From: "tonydoy@xxxxxxxxxxxxxx" <tonydoy@xxxxxxxxxxxxxx>
- Date: Fri, 29 Jun 2007 15:52:47 -0700
First, try updating to the latest in CVS (you can do this via tkcon's
Help -> Retrieve Latest Version if it is relatively recent).
Then do:
wish tkcon.tcl mainScript.tcl -- configScript.tcl
I think there was a bug in the -- handling previously that I've
corrected. Let me know whether it works or not.
Jeff
Hi Jeff,
v1.98. I tried 'Retrieve Latest Version' but got the error messageFrom the help of my current tkcon I can see that I have v2.4, CVS
"Failed to retrieve latest tkcon source: expected http return code
200, received 403".
I therefore performed
tkcon master set ::tkcon:PRIV(proxy) wwwproxy:8080
and tried again, but still the same error message.
I decided to go direct to http://tkcon.sourceforge.net/ and downloaded
tkcon from there. I now have v2.5, CVS v1.101.
I ran the script again (with fingers crossed) but still,
mainScript.tcl is complaining that is does have any arguments :-(. I
have written the following very simple script to test this;
mainScript.tcl:
if {[llength $argv] == 0} {
puts "ERROR, no argument provided"
update
after 5000
exit
} else {
puts "SUCCESS: Argument \"[lindex $argv 0]\" provided"
update
source [lindex $argv 0]
puts "Constant1 = $CONSTANT1" ;# CONSTANT1 is only defined in the
sourced file
update
after 5000
exit
}
I then launched this from the wish console as follows
exec wish "D:/Tcl/bin/tkcon.tcl" "mainScript.tcl" --
"configScript.tcl"
But it runs as expected if I type the following in to Windows command
prompt
wish "D:/Tcl/bin/tkcon.tcl" "mainScript.tcl" "configScript.tcl"
Incidentally, I have noticed that I have to change directory to where
my scripts are and then run the exec command because tkcon complains
that no such file or directory exists if I type the following
(specifing the full path).
exec wish "D:/Tcl/bin/tkcon.tcl" "H:/Tone/My Documents/TCL/
tkcon_scripts/mainScript.tcl" -- "H:/Tone/My Documents/TCL/
tkcon_scripts/configScript.tcl"
Am I doing something wrong?
As always, guidance and pointers are most welcome.
Regards
Tony
.
- References:
- Launching Tkcon with a main script and another as arguments
- From: tonydoy@xxxxxxxxxxxxxx
- Re: Launching Tkcon with a main script and another as arguments
- From: Jeff Hobbs
- Launching Tkcon with a main script and another as arguments
- Prev by Date: Re: Is there already a "sourcecode to optimized converter" for tcl?
- Next by Date: Re: A widget for the user's editor of choice
- Previous by thread: Re: Launching Tkcon with a main script and another as arguments
- Next by thread: Wrapped application directory oddity
- Index(es):
Relevant Pages
|