Ignore:
Timestamp:
Mar 16, 2013, 12:28:44 PM (12 years ago)
Author:
gah
Message:

Add string trim to select 'xml get' calls

File:
1 edited

Legend:

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

    r3330 r3513  
    6060
    6161    # if there are min/max values, plug them in.
    62     set min [$_owner xml get $path.min]
     62    set min [string trim [$_owner xml get $path.min]]
    6363    if {"" != $min} {
    6464        $itk_component(spinner) configure -minvalue $min
    6565    }
    6666
    67     set max [$_owner xml get $path.max]
     67    set max [string trim [$_owner xml get $path.max]]
    6868    if {"" != $max} {
    6969        $itk_component(spinner) configure -maxvalue $max
     
    7171
    7272    # if there is a color, use it for the min/max spectrum
    73     set color [$_owner xml get $path.about.color]
     73    set color [string trim [$_owner xml get $path.about.color]]
    7474    if {$color != "" && $min != "" && $max != ""} {
    7575        # For compatibility. If only one color use white for min
     
    7878        }
    7979        $itk_component(spinner) configure \
    80             -spectrum [Rappture::Spectrum ::#auto $color]
     80            -spectrum [Rappture::Spectrum ::\#auto $color]
    8181    }
    8282
    8383    # if the control has an icon, plug it in
    84     set str [$_owner xml get $path.about.icon]
     84    set str [string trim [$_owner xml get $path.about.icon]]
    8585    if {$str != ""} {
    8686        $itk_component(spinner) configure -image \
     
    9393    # Assign the default value to this widget, if there is one.
    9494    #
    95     set str [$_owner xml get $path.default]
    96     if {"" != $str != ""} { $itk_component(spinner) value $str }
     95    set str [string trim [$_owner xml get $path.default]]
     96    if {"" != $str != ""} {
     97        $itk_component(spinner) value $str
     98    }
    9799}
    98100
     
    158160    set str [$_owner xml get $_path.about.description]
    159161
    160     set min [$_owner xml get $_path.min]
    161     set max [$_owner xml get $_path.max]
     162    set min [string trim [$_owner xml get $_path.min]]
     163    set max [string trim [$_owner xml get $_path.max]]
    162164
    163165    if {$min != "" || $max != ""} {
Note: See TracChangeset for help on using the changeset viewer.