Get the html help viewer to accept non-html filenames.
handle interps without Tk commands
+Fri Mar 22 15:53:54 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
+
+ * names.tcl: Bug #533642: send ::info in case info is redefined.
+ * help.tcl: Get the html help viewer to accept non-html filenames.
+ * windows_info.tcl: handle interps without Tk commands
+ * images_list.tcl: handle interps without Tk commands
+
Fri Mar 22 01:04:59 2002 Pat Thoyts <patthoyts@users.sourceforge.net>
+ * version.tcl: Released version 5.1.6p7
* globals_list.tcl:
* value.tcl: Bug #533367: use default Tk file selection dialogs.
$self read_topic $topic
}
method read_topic {topic} {
+ # probably should use uri::geturl from tcllib
set slot(topic) $topic
wm title $self "Help: $topic"
- set f [open $slot(helpdir)/$topic.html r]
+ set filename [file join $slot(helpdir) $topic]
+ if {![file exist $filename]} {
+ append $filename .html
+ }
+ set f [open $filename r]
set txt [read $f]
close $f
feedback .help_feedback -steps [set slot(len) [string length $txt]] \
}
}
method follow_link {link} {
- $self show_topic [file root $link]
+ $self show_topic $link
}
method forward {} {
if {$slot(rendering) || ($slot(history_ndx)+1) >= $slot(history_len)} return
}
method update {target} {
$self clear
- foreach image [lsort [send $target image names]] {
+ set cmd [list if {[info command image] != {}} {image names}]
+ foreach image [lsort [send $target $cmd]] {
$self append $image
}
}
proc procs target {
set result {}
foreach n [names $target] {
- foreach p [send $target namespace eval $n info procs] {
+ foreach p [send $target namespace eval $n ::info procs] {
lappend result "$n\::$p"
}
}
proc vars target {
set result {}
foreach n [names $target] {
- foreach v [send $target info vars ${n}::*] {
+ foreach v [send $target ::info vars ${n}::*] {
lappend result $v
}
}
method get_windows {} { return $slot(windows) }
method append_windows {target result_var parent} {
upvar $result_var result
- foreach w [send $target [list winfo children $parent]] {
+ set cmd "if {\[::info command winfo\] != {}} {\n\
+ winfo children $parent\n\
+ }"
+ foreach w [send $target $cmd] {
lappend slot(windows) $w
$self append_windows $target result $w
}
}
method update {target} {
$self clear
- if {[catch {set slot(windows) [send $target winfo children .]}]} {
+ set cmd [list if {[::info command winfo] != {}} {::winfo children .}]
+ if {[catch {set slot(windows) [send $target $cmd]}]} {
set slot(windows) {}
}
feedback .feedback -title "Getting Windows" \