From: Jeff Hobbs Date: Thu, 10 Jul 2014 02:13:20 +0000 (+0000) Subject: * tkcon.tcl (idebug): allow multi-char patterns as debug id [Lama] X-Git-Url: http://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=20455aa44dd2b5df6b6598cb3f0ce17885aab9af;p=tkcon * tkcon.tcl (idebug): allow multi-char patterns as debug id [Lama] --- diff --git a/ChangeLog b/ChangeLog index e22c844..666ca94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-07-09 Jeff Hobbs + + * tkcon.tcl (idebug): allow multi-char patterns as debug id [Lama] + 2013-01-22 Jeff Hobbs * tkcon.tcl (tkcon show): catch deiconify as it will throw an diff --git a/tkcon.tcl b/tkcon.tcl index ee6a6c1..09fd9f4 100755 --- a/tkcon.tcl +++ b/tkcon.tcl @@ -4328,14 +4328,15 @@ proc idebug {opt args} { set level [expr {[info level]-1}] switch -glob -- $opt { on { - if {[llength $args]} { set IDEBUG(id) $args } + # id is just arg0 [bug #50] + if {[llength $args]} { set IDEBUG(id) [lindex $args 0] } return [set IDEBUG(on) 1] } off { return [set IDEBUG(on) 0] } id { if {![llength $args]} { return $IDEBUG(id) - } else { return [set IDEBUG(id) $args] } + } else { return [set IDEBUG(id) [lindex $args 0]] } } break { if {!$IDEBUG(on) || $IDEBUG(debugging) || \