From: Pat Thoyts Date: Thu, 4 Apr 2002 23:08:56 +0000 (+0000) Subject: Hitched version to p8. X-Git-Tag: r5_1_6p8 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=dc6a55ad735063d2700527ca516e257dfb244ae6;p=tkinspect Hitched version to p8. --- diff --git a/ChangeLog b/ChangeLog index 92486f3..af9c875 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Thu Apr 04 22:38:44 2002 Pat Thoyts + + * globals_list.tcl: + * names.tcl: fix array checking (use array exists). + * tkinspect.tcl: merged in support for scripted documents (patch + by Steve Landers). Use the winsend package if available. + Mon Mar 25 12:05:22 2002 Pat Thoyts * Bug #533899: Found and merged Paul Healy's 1997 p4 patch which adds diff --git a/README b/README index 72e2186..37f5075 100644 --- a/README +++ b/README @@ -1,5 +1,5 @@ - tkinspect, release 5.1.6p7 - (22 Mar 2002) + tkinspect, release 5.1.6p8 + (04 Apr 2002) Tkinspect is a Tk program browser originally written by Sam Shen and now updated to work with Tcl/Tk 8+, incr Tcl 3+ and to cope with diff --git a/WhatsNew.html b/WhatsNew.html index df3d7ae..c862013 100644 --- a/WhatsNew.html +++ b/WhatsNew.html @@ -9,19 +9,41 @@

What's New?

See the ChangeLog for more details. - + +

Changes in release 5.1.6p8 (04 Apr 2002)

+ +
    +
  • Merged in Paul Healy's p4 patch which provides + namespaces and afters windows for examining entire + namespaces or the after event timers.
  • +
  • Fixed array checking. array size was use instead of + array exists in some places which can cause an empty + array to be treated as if it is a normal variable.
  • +
  • Merged in Steve Landers code for Scripted Document + support
  • +
+ +

Changes in release 5.1.6p7 (22 Mar 2002)

+ +
    +
  • A raft of bugs have been fixed - see the + ChangeLog for just what.
  • +
  • Added a DDE implementation of send for use on + Windows.
  • +
+

Changes in release 5.1.6p6 (14 Mar 2002)

- The original code plus some patches have been collected together and +

The original code plus some patches have been collected together and added to the tkcon project as SourceForge. Some general work has been done to bring tkinspect up to date for use with - Tcl 8.3 and 8.4 and incr Tcl 3.2. + Tcl 8.3 and 8.4 and incr Tcl 3.2.

Changes in release 5.1.6 (23 June 1995)

- 5.1.6 has only 2 bug fixes, see the - ChangeLog if you're really interested. +

5.1.6 has only 2 bug fixes, see the + ChangeLog if you're really interested.

Changes in release 5.1.4 (21 June 1995)

diff --git a/globals_list.tcl b/globals_list.tcl index 85002bb..4dd0603 100644 --- a/globals_list.tcl +++ b/globals_list.tcl @@ -30,7 +30,7 @@ dialog variable_trace { text $self.t -yscroll "$self.sb set" -setgrid 1 pack $self.sb -side right -fill y pack $self.t -side right -fill both -expand 1 - if {[send $slot(target) array size $slot(variable)] == 0} { + if {![send $slot(target) array exists $slot(variable)]} { set slot(trace_cmd) "send [winfo name .] $self update_scalar" $self update_scalar "" "" w set slot(is_array) 0 diff --git a/names.tcl b/names.tcl index ae65d96..05c7aae 100644 --- a/names.tcl +++ b/names.tcl @@ -65,7 +65,7 @@ namespace eval names { proc value {target var} { set tail [namespace tail $var] - if [send $target [list array size $var]] { + if {[send $target [list array exists $var]]} { return "variable $tail ; # $var is an array\n" ; # dump it out? } set cmd [list set $var] diff --git a/tkinspect.tcl b/tkinspect.tcl index ac73632..2f7f54e 100644 --- a/tkinspect.tcl +++ b/tkinspect.tcl @@ -39,14 +39,30 @@ if {[info commands itcl_info] != ""} { wm withdraw . -if [file exists @tkinspect_library@/tclIndex] { +# Find the tkinspect library - support scripted documents (Steve Landers) +if {[info exists ::scripdoc::self]} { + lappend auto_path [file join $::scripdoc::self lib] + set tkinspect_library [file join $::scripdoc::self lib tkinspect] + lappend auto_path $tkinspect_library +} elseif [file exists @tkinspect_library@/tclIndex] { lappend auto_path [set tkinspect_library @tkinspect_library@] } else { - lappend auto_path [set tkinspect_library .] + lappend auto_path [set tkinspect_library [file dirname [info script]]] } -# Emulate the 'send' command using the dde package if available. +# Use the winsend package if available. if {[info command send] == {}} { + if {![catch {package require winsend}]} { + set tkinspect(title) [winsend appname] + + proc send {app args} { + eval winsend send [list $app] $args + } + } +} + +# Emulate the 'send' command using the dde package if available. +if {[info command send] == {} || [package provide winsend] != {}} { if {![catch {package require dde}]} { array set dde [list count 0 topic $tkinspect(title)] while {[dde services TclEval $dde(topic)] != {}} { @@ -56,8 +72,18 @@ if {[info command send] == {}} { dde servername $dde(topic) set tkinspect(title) $dde(topic) unset dde - proc send {app args} { - eval dde eval [list $app] $args + if {[package provide winsend] != {}} { + proc send {app args} { + if {[string match {!*} $app]} { + eval dde eval [list [string range $app 1 end]] $args + } else { + eval winsend send [list $app] $args + } + } + } else { + proc send {app args} { + eval dde eval [list $app] $args + } } } } @@ -238,10 +264,25 @@ dialog tkinspect_main { method fill_interp_menu {} { set m $self.menu.file.m.interps catch {$m delete 0 last} + set winsend 0 + if {[package provide winsend] != {}} { + set winsend 1 + foreach interp [winsend interps] { + $m add command -label $interp \ + -command [list $self set_target $interp] + } + } if {[package provide dde] != {}} { foreach service [dde services TclEval {}] { - $m add command -label [lindex $service 1] \ - -command [list $self set_target [lindex $service 1]] + if {$winsend} { + set label "[lindex $service 1] (dde)" + set app "![lindex $service 1]" + } else { + set label [lindex $service 1] + set app $label + } + $m add command -label $label \ + -command [list $self set_target $app] } } else { foreach interp [winfo interps] { diff --git a/version.tcl b/version.tcl index c0a45d8..449e2f0 100644 --- a/version.tcl +++ b/version.tcl @@ -6,8 +6,8 @@ proc version_init {} { global tkinspect tk_version tk_patchLevel - set tkinspect(release) 5.1.6p7 - set tkinspect(release_date) "22 Mar 2002" + set tkinspect(release) 5.1.6p8 + set tkinspect(release_date) "04 Apr 2002" scan $tk_version "%d.%d" major minor if {$major < 8} { puts stderr \