+2005-05-25 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * tkcon.tcl (InitMenus): add ActiveTcl Help menu item, if AT Help
+ is found.
+
2005-04-06 Jeff Hobbs <jeffh@ActiveState.com>
* tkcon.tcl (ExpandXotcl): allow for xotcl method name expansion,
-command ::tkcon::About
$m add command -label "Retrieve Latest Version" -underline 0 \
-command ::tkcon::Retrieve
+ if {![catch {package require ActiveTcl} ver]} {
+ set cmd ""
+ if {$tcl_platform(platform) == "windows"} {
+ package require registry
+ set ver [join [lrange [split $ver .] 0 3] .]
+ set key {HKEY_LOCAL_MACHINE\SOFTWARE\ActiveState\ActiveTcl}
+ if {![catch {registry get "$key\\$ver\\Help" ""} help]
+ && [file exists $help]} {
+ set cmd [list exec $::env(COMSPEC) /c start $help]
+ }
+ } elseif {$tcl_platform(os) == "Darwin"} {
+ set ver ActiveTcl-[join [lrange [split $ver .] 0 1] .]
+ set rsc "/Library/Frameworks/Tcl.framework/Resources"
+ set help "$rsc/English.lproj/$ver/index.html"
+ if {[file exists $help]} {
+ set cmd [list exec open $help]
+ }
+ } elseif {$tcl_platform(platform) == "unix"} {
+ set help [file dirname [info nameofexe]]
+ append help /../html/index.html
+ if {[file exists $help]} {
+ set cmd [list puts "Start $help"]
+ }
+ }
+ if {$cmd != ""} {
+ $m add separator
+ $m add command -label "ActiveTcl Help" -underline 10 \
+ -command $cmd
+ }
+ }
}
}