From d018a6fe229f8e0a3e5913baddd80ce19c476db9 Mon Sep 17 00:00:00 2001 From: Nick White Date: Mon, 27 Aug 2012 18:25:07 +0100 Subject: GUI workarounds for windows weirdness --- getxbookgui.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/getxbookgui.tcl b/getxbookgui.tcl index d980c62..0c5c116 100755 --- a/getxbookgui.tcl +++ b/getxbookgui.tcl @@ -20,8 +20,10 @@ proc updateStatus {chan} { if {![eof $chan]} { set a [gets $chan] if { $a != "" } { + # this string match appears to return true even when it shouldn't on windows if { [string match "*%*" "$a"] } { - if { [regexp {^([0-9]*)} $a m num] } { + # can't rely on the return value of regexp + if { [regexp {^([0-9]*)} $a m num] && "$num" != "" } { .prog coords bar 0 0 [expr $num * 2] 20 } } else { .st configure -text $a } -- cgit v1.2.3