(observe): allow observe of "proc"
authorJeff Hobbs <hobbs@users.sourceforge.net>
Wed, 12 May 2004 21:09:10 +0000 (21:09 +0000)
committerJeff Hobbs <hobbs@users.sourceforge.net>
Wed, 12 May 2004 21:09:10 +0000 (21:09 +0000)
ChangeLog
tkcon.tcl

index 52bb175ebea1f05745c3b2f8f3e45b3dfbb4c619..fcaf5a5ac2308f2d533b41c57c9cba45cc4f866f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2004-05-12  Jeff Hobbs  <jeffh@ActiveState.com>
+
+       * tkcon.tcl (observe): allow observe of 'proc'
+
 2004-03-20  Jeff Hobbs  <jeffh@ActiveState.com>
 
        * tkcon.tcl (::tkcon::EvalSocketEvent): correctly handle socket
index 066c067e30024df7a005b7552f5c44cf0fa7edef..c7837da9e313f404a75b96fb34f4511d2c780388 100755 (executable)
--- 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} {