Ignore:
Timestamp:
May 14, 2013 2:33:22 PM (11 years ago)
Author:
gah
Message:

add string trim to inputs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/gui/scripts/choiceentry.tcl

    r3513 r3646  
    136136# ----------------------------------------------------------------------
    137137itcl::body Rappture::ChoiceEntry::label {} {
    138     set label [$_owner xml get $_path.about.label]
     138    set label [string trim [$_owner xml get $_path.about.label]]
    139139    if {"" == $label} {
    140140        set label "Choice"
     
    193193                $_owner notify add $this $cntl [itcl::code $this _rebuild]
    194194
    195                 set label [$_owner xml get $_path.$cname.about.label]
     195                set label \
     196                    [string trim [$_owner xml get $_path.$cname.about.label]]
    196197                if {"" == $label} {
    197198                    set label "%type #%n"
     
    208209                        set subst(%id) [$_owner xml element -as id $leading.$ccname]
    209210                        foreach detail [$_owner xml children $leading.$ccname] {
    210                             set subst(%$detail) [$_owner xml get $leading.$ccname.$detail]
     211                            set subst(%$detail) \
     212                                [$_owner xml get $leading.$ccname.$detail]
    211213                        }
    212214                        set str [string map [array get subst] $label]
     
    226228            #
    227229            set val [string trim [$_owner xml get $_path.$cname.value]]
    228             set str [$_owner xml get $_path.$cname.about.label]
     230            set str [string trim [$_owner xml get $_path.$cname.about.label]]
    229231            if {"" == $val} {
    230232                set val $str
     
    276278# ----------------------------------------------------------------------
    277279itcl::body Rappture::ChoiceEntry::_tooltip {} {
    278     set tip [$_owner xml get $_path.about.description]
     280    set tip [string trim [$_owner xml get $_path.about.description]]
    279281
    280282    # get the description for the current choice, if there is one
     
    283285    set desc ""
    284286    if {$path != ""} {
    285         set desc [$_owner xml get $path.about.description]
     287        set desc [string trim [$_owner xml get $path.about.description]]
    286288    }
    287289
Note: See TracChangeset for help on using the changeset viewer.