- Timestamp:
- Feb 19, 2007, 11:07:33 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gui/scripts/gauge.tcl
r571 r578 219 219 set units $itk_option(-units) 220 220 if {"" != $units} { 221 set newval [Rappture::Units::convert $newval \ 222 -context $units] 221 set newval [Rappture::Units::convert $newval -context $units] 223 222 set nvUnits [Rappture::Units::Search::for $newval] 224 223 if { "" == $nvUnits} { 225 224 set msg [Rappture::Units::description $units] 226 error "Unrecognized units: $newval\nEnter value with units $msg"225 error "Unrecognized units: $newval\nEnter value with units of $msg" 227 226 } 228 227 set nv [Rappture::Units::convert $nv \ 229 228 -context $units -to $units -units off] 229 230 # Normalize the units name 231 set newval [Rappture::Units::convert $newval -units off]$nvUnits 230 232 } 231 233 … … 245 247 if {"" != $itk_option(-minvalue)} { 246 248 set convMinVal [set minv $itk_option(-minvalue)] 247 if { $units != ""} {249 if {"" != $units} { 248 250 set minv [Rappture::Units::convert $minv \ 249 251 -context $units -to $units -units off] … … 266 268 if {"" != $itk_option(-maxvalue)} { 267 269 set convMaxVal [set maxv $itk_option(-maxvalue)] 268 if { $units != ""} {270 if {"" != $units} { 269 271 set maxv [Rappture::Units::convert $maxv \ 270 272 -context $units -to $units -units off] … … 288 290 return 289 291 } 292 290 293 set _value $newval 294 291 295 _redraw 292 296 event generate $itk_component(hull) <<Value>>
Note: See TracChangeset
for help on using the changeset viewer.