+2003-03-31 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl (tkcon::Retrieve): correct the check for tkcon version
+ when retrieving from http.
+
2003-02-20 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl (EvalCmd): set $:: (aka ${}) var to last command result.
# Initialize the ::tkcon namespace
#
namespace eval ::tkcon {
+ # when modifying this line, make sure that the auto-upgrade check
+ # for version still works.
variable VERSION "2.4"
# The OPT variable is an array containing most of the optional
# info to configure. COLOR has the color data.
puts -nonewline $fid $data
close $fid
regexp {Id: tkcon.tcl,v (\d+\.\d+)} $data -> rcsVersion
- regexp {version\s+(\d+\.\d[^\n]*)} $data -> tkconVersion
+ regexp {VERSION\s+"(\d+\.\d+[^\"]*)"} $data -> tkconVersion
}
} err]
::http::cleanup $token
if {$code} {
return -code error $err
- } elseif {[tk_messageBox -type yesno -icon info -parent $PRIV(root) \
- -title "Retrieved tkcon v$tkconVersion, RCS $rcsVersion" \
- -message "Successfully retrieved tkcon v$tkconVersion,\
- RCS $rcsVersion. Shall I resource (not restart) this\
- version now?"] == "yes"} {
- set PRIV(SCRIPT) $file
- set PRIV(version) $tkconVersion.$rcsVersion
- ::tkcon::Resource
+ } else {
+ if {![info exists rcsVersion]} { set rcsVersion "UNKNOWN" }
+ if {![info exists tkconVersion]} { set tkconVersion "UNKNOWN" }
+ if {[tk_messageBox -type yesno -icon info -parent $PRIV(root) \
+ -title "Retrieved tkcon v$tkconVersion, RCS $rcsVersion" \
+ -message "Successfully retrieved tkcon v$tkconVersion,\
+ RCS $rcsVersion. Shall I resource (not restart) this\
+ version now?"] == "yes"} {
+ set PRIV(SCRIPT) $file
+ set PRIV(version) $tkconVersion.$rcsVersion
+ ::tkcon::Resource
+ }
}
}
}