On 28/09/2011 1:16 PM, gary sachs wrote:
Trying to use the dateentry widget...
Tkx::package_require("widget::dateentry");<<<<< line 710
...
If I try and execute I get the following error...
can't read "argv0": no such variable at c:\qa\tobserver.pl line 710.
I looked fro the dateentry widget and do see v0.93 in the tkkit.dll.
If I comment out line 710, then all runs just fine.
Interesting - it seems that embedding into the Perl environment causes
Tcl to skip the init parts that would otherwise set ::argv0 (Perl
$ARGV[0]). The dateentry.tcl script has some test code at the end that
checks to see if you are running itself as the main script to show some
demo usage.
I would say the best work-around is to do
Tkx::set('::argv0', $ARGV[0] || ""); # work-around for dateentry usage
of argv0
and that should get around it without effecting real operation. I'll
fix up dateentry.tcl so that in the future it will do it's own var
existence check of argv0 for such embedded use cases.
Regards,
Jeff