Changeset 3510
- Timestamp:
- Mar 16, 2013 8:33:10 AM (11 years ago)
- Location:
- trunk/gui/scripts
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/gauge.tcl
r3330 r3510 226 226 if { "" == $nvUnits} { 227 227 set msg [Rappture::Units::description $units] 228 error " Unrecognized units: $newval\nEntervalue with units of $msg"228 error "unrecognized units in value \"$newval\": should be value with units of $msg" 229 229 } 230 230 set nv [Rappture::Units::convert $nv \ -
trunk/gui/scripts/switch.tcl
r3330 r3510 70 70 if {[llength $args] == 1} { 71 71 set newval [lindex $args 0] 72 if {![string is boolean -strict $newval]} { 73 error "Should be a boolean value" 72 # I don't like the "string is" commands. They have too many quirks. 73 # If we're calling "expr" anyways, just put a catch on it. 74 if { [catch {expr {($newval) ? 1 : 0}} newval] != 0 } { 75 error "$newval: should be a yes, no, on, off, true, false, 0, or 1." 74 76 } 75 set newval [expr {($newval) ? 1 : 0}]76 77 if {$onlycheck} { 77 78 return
Note: See TracChangeset
for help on using the changeset viewer.