Changeset 553 for trunk


Ignore:
Timestamp:
Dec 7, 2006 3:19:53 PM (17 years ago)
Author:
dkearney
Message:

moved the integer/real value check up infront of the min max value check to avoid confusing error messages as stated in commit number 552

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/scripts/gauge.tcl

    r552 r553  
    226226        }
    227227
     228        switch -- $itk_option(-type) {
     229            integer {
     230                if {![string is integer -strict $nv]} {
     231                    error "Should be an integer value"
     232                }
     233            }
     234            real {
     235                if {![string is double -strict $nv]} {
     236                    error "Should be a real number"
     237                }
     238            }
     239        }
     240
    228241        if {"" != $itk_option(-minvalue)} {
    229242            set convMinVal [set minv $itk_option(-minvalue)]
     
    268281        }
    269282
    270         switch -- $itk_option(-type) {
    271             integer {
    272                 if {![string is integer -strict $nv]} {
    273                     error "Should be an integer value"
    274                 }
    275             }
    276             real {
    277                 if {![string is double -strict $nv]} {
    278                     error "Should be a real number"
    279                 }
    280             }
    281         }
    282 
    283283        if {$onlycheck} {
    284284            return
Note: See TracChangeset for help on using the changeset viewer.