Changeset 2783 for trunk/gui


Ignore:
Timestamp:
Feb 8, 2012 12:57:12 PM (12 years ago)
Author:
gah
Message:

add disablestyle element to hide/greout element when disabled.

Location:
trunk/gui/scripts
Files:
3 edited

Legend:

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

    r2782 r2783  
    646646# ----------------------------------------------------------------------
    647647itcl::body Rappture::Analyzer::clear {} {
    648     $itk_component(resultset) addtotree
    649 
    650648    foreach obj $_runs {
    651649        itcl::delete object $obj
  • trunk/gui/scripts/controls.tcl

    r2782 r2783  
    192192    set notify [string trim [$_owner xml get $path.about.notify]]
    193193
    194     #
    195     # If this element has an <enable> expression, then register
    196     # its controlling widget here.
    197     #
    198194    set disablestyle [string trim [$_owner xml get $path.about.disablestyle]]
    199     set _name2info($name-disablestyle) $disablestyle
    200 
     195    if { $disablestyle != "" } {
     196        set _name2info($name-disablestyle) $disablestyle
     197    }
    201198    #
    202199    # If this element has an <enable> expression, then register
  • trunk/gui/scripts/resultset.tcl

    r2782 r2783  
    5454    public method contains {xmlobj}
    5555    public method size {{what -results}}
    56     public method addtotree {}
    5756
    5857    protected method _doClear {}
     
    16591658}
    16601659
    1661 itcl::body Rappture::ResultSet::addtotree {} {
    1662     set index current
    1663     if {$index == "current"} {
    1664         # search for the result for these settings
    1665         set format ""
    1666         set tuple ""
    1667         foreach col [lrange [$_results column names] 1 end] {
    1668             lappend format $col
    1669             lappend tuple $_cntlInfo($this-$col-value)
    1670         }
    1671         set index [$_results find -format $format -- $tuple]
    1672         if {"" == $index} {
    1673             return ""  ;# somethings wrong -- bail out!
    1674         }
    1675     }
    1676     set tree [blt::tree create]
    1677     foreach col $_cntlInfo($this-all) {
    1678         set node [$tree insert 0 -label $col]
    1679         set quantity $_cntlInfo($this-$col-label)
    1680         # Be careful giving singleton elements as the "columns"
    1681         # argument to "Tuples::get". It is expecting a list.
    1682         foreach {label val} [_getValues $col all] {
    1683             if {$col == "xmlobj"} {
    1684                 set val "#[expr {$val+1}]"
    1685             }
    1686             $tree set $node $label $val
    1687         }
    1688     }
    1689     $tree dumpfile 0 clear.dump
    1690 }
Note: See TracChangeset for help on using the changeset viewer.