Ignore:
Timestamp:
Oct 18, 2010 11:59:55 AM (14 years ago)
Author:
gah
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/blt4/gui/scripts/pushbutton.tcl

    r1725 r1923  
    2828
    2929    constructor {args} {
    30         # defined below
     30        # defined below
    3131    }
    3232    destructor {
    33         # defined below
     33        # defined below
    3434    }
    3535
     
    7878itcl::body Rappture::PushButton::invoke {} {
    7979    if { !$_enabled } {
    80         puts "in invoke button not enabled"
     80        puts "in invoke button not enabled"
    8181        return
    8282    }
     
    127127    upvar #0 $itk_option(-variable) var
    128128    if { $var != "" && [string is boolean $var] } {
    129         set var [expr "$var == 1"]
     129        set var [expr "$var == 1"]
    130130    }
    131131    if { $var == $onvalue } {
    132         set _state 1
    133         $itk_component(button) configure -relief sunken \
    134             -image $onimage -bg white
     132        set _state 1
     133        $itk_component(button) configure -relief sunken \
     134            -image $onimage -bg white
    135135    } else {
    136         set _state 0
    137         $itk_component(button) configure -relief raise \
    138             -image $offimage -bg grey85
     136        set _state 0
     137        $itk_component(button) configure -relief raise \
     138            -image $offimage -bg grey85
    139139    }
    140140}
     
    162162itcl::configbody Rappture::PushButton::variable {
    163163    if {"" != $_variable} {
    164         upvar #0 $_variable var
    165         trace remove variable var write [itcl::code $this _fixValue]
     164        upvar #0 $_variable var
     165        trace remove variable var write [itcl::code $this _fixValue]
    166166    }
    167167    set _variable $itk_option(-variable)
    168168
    169169    if {"" != $_variable} {
    170         upvar #0 $_variable var
    171         trace add variable var write [itcl::code $this _fixValue]
     170        upvar #0 $_variable var
     171        trace add variable var write [itcl::code $this _fixValue]
    172172
    173         # sync to the current value of this variable
    174         if {[info exists var]} {
    175             _fixValue
    176         }
     173        # sync to the current value of this variable
     174        if {[info exists var]} {
     175            _fixValue
     176        }
    177177    }
    178178}
Note: See TracChangeset for help on using the changeset viewer.