From: Pat Thoyts Date: Sun, 24 Mar 2002 23:32:12 +0000 (+0000) Subject: Bug #533642: send ::info in case info is redefined. X-Git-Tag: r5_1_6p8~3 X-Git-Url: http://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=29bb90eda4ef6fae4a5bb48a9a8c28b2c654ea4f;p=tkinspect Bug #533642: send ::info in case info is redefined. Get the html help viewer to accept non-html filenames. handle interps without Tk commands --- diff --git a/ChangeLog b/ChangeLog index 61301b6..bf1b43c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ +Fri Mar 22 15:53:54 2002 Pat Thoyts + + * 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 + * version.tcl: Released version 5.1.6p7 * globals_list.tcl: * value.tcl: Bug #533367: use default Tk file selection dialogs. diff --git a/help.tcl b/help.tcl index d7a1380..6266375 100644 --- a/help.tcl +++ b/help.tcl @@ -70,9 +70,14 @@ dialog help_window { $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]] \ @@ -98,7 +103,7 @@ dialog help_window { } } 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 diff --git a/images_list.tcl b/images_list.tcl index b9ac8e7..08161cc 100644 --- a/images_list.tcl +++ b/images_list.tcl @@ -20,7 +20,8 @@ widget images_list { } 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 } } diff --git a/names.tcl b/names.tcl index ee9271d..8fe5aa3 100644 --- a/names.tcl +++ b/names.tcl @@ -22,7 +22,7 @@ namespace eval names { 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" } } @@ -32,7 +32,7 @@ namespace eval names { 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 } } diff --git a/windows_info.tcl b/windows_info.tcl index a7c782b..44558b0 100644 --- a/windows_info.tcl +++ b/windows_info.tcl @@ -18,14 +18,18 @@ object_class windows_info { 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" \