From: Jeff Hobbs Date: Wed, 12 May 2004 21:09:10 +0000 (+0000) Subject: (observe): allow observe of "proc" X-Git-Tag: tkcon-2-4~4 X-Git-Url: http://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=bcfbcc651d48ec08e6e1e2ae02921bbee2e490ca;p=tkcon (observe): allow observe of "proc" --- diff --git a/ChangeLog b/ChangeLog index 52bb175..fcaf5a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-05-12 Jeff Hobbs + + * tkcon.tcl (observe): allow observe of 'proc' + 2004-03-20 Jeff Hobbs * tkcon.tcl (::tkcon::EvalSocketEvent): correctly handle socket diff --git a/tkcon.tcl b/tkcon.tcl index 066c067..c7837da 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -4230,8 +4230,11 @@ proc observe {opt name args} { rename $name $old set max 4 regexp {^[0-9]+} $args max + # handle the observe'ing of 'proc' + set proccmd "proc" + if {[string match "proc" $name]} { set proccmd $old } ## idebug trace could be used here - proc $name args " + $proccmd $name args " for {set i \[info level\]; set max \[expr \[info level\]-$max\]} { \$i>=\$max && !\[catch {uplevel \#\$i info level 0} info\] } {incr i -1} {