Changeset 1399 for trunk/gui/scripts


Ignore:
Timestamp:
Apr 15, 2009 2:03:05 PM (15 years ago)
Author:
gah
Message:

quick fix for sequence/radiodial

Location:
trunk/gui/scripts
Files:
2 edited

Legend:

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

    r1342 r1399  
    6666    protected method _toggleAll {{column "current"}}
    6767    protected method _getValues {column {which ""}}
     68    protected method _getRawValues {column {which ""}}
    6869    protected method _getTooltip {role column}
    6970    protected method _getParamDesc {which {index "current"}}
     
    652653
    653654            $dial clear
    654             foreach {label val} [_getValues $col all] {
     655            foreach {label val} [_getRawValues $col all] {
    655656                $dial add $label $val
    656657            }
     
    15241525
    15251526# ----------------------------------------------------------------------
     1527# USAGE: _getRawValues <column> ?<which>?
     1528#
     1529# Called automatically whenever the user hovers a control within
     1530# this widget.  Returns the tooltip associated with the control.
     1531# ----------------------------------------------------------------------
     1532itcl::body Rappture::ResultSet::_getRawValues {col {which ""}} {
     1533    if {$col == "xmlobj"} {
     1534        # load the Simulation # control
     1535        set nruns [$_results size]
     1536        for {set n 0} {$n < $nruns} {incr n} {
     1537            set v "#[expr {$n+1}]"
     1538            set label2val($v) $n
     1539        }
     1540    } else {
     1541        set vlist ""
     1542        foreach rec [$_results get -format [list xmlobj $col]] {
     1543            lappend vlist [lindex $rec 1]
     1544        }
     1545        # Don't have normalized. Sort and create nums
     1546        set n 0
     1547        foreach v [lsort $vlist] {
     1548            incr n
     1549            set label2val($v) $n
     1550        }
     1551    }
     1552    switch -- $which {
     1553        current {
     1554            set curr $_cntlInfo($this-$col-value)
     1555            if {[info exists label2val($curr)]} {
     1556                return [list $curr $label2val($curr)]
     1557            }
     1558            return ""
     1559        }
     1560        all {
     1561            return [array get label2val]
     1562        }
     1563        default {
     1564            if {[string is integer $which]} {
     1565                if {$col == "xmlobj"} {
     1566                    set val "#[expr {$which+1}]"
     1567                } else {
     1568                    set val [lindex [$_results get -format $col $which] 0]
     1569                }
     1570                if {[info exists label2val($val)]} {
     1571                    return [list $val $label2val($val)]
     1572                }
     1573                return ""
     1574            }
     1575            error "bad option \"$which\": should be all, current, or an integer index"
     1576        }
     1577    }
     1578}
     1579
     1580# ----------------------------------------------------------------------
    15261581# USAGE: _getTooltip <role> <column>
    15271582#
  • trunk/gui/scripts/sidebarframe.tcl

    r1391 r1399  
    189189
    190190    #
    191     # Tabs used to select sidebar panels
     191    # Tabs used to select sidebar panels. 
     192    #
     193    # Note:  Bugs in BLT 2.4 tabset/VNC server crashes the server
     194    #        when -outerpad is set to 0.
    192195    #
    193196    itk_component add tabs {
     
    195198            -highlightthickness 0 -tearoff 0 -side left \
    196199            -bd 0 -gap 0 -tabborderwidth 1 \
    197             -outerpad 0
     200            -outerpad 1
    198201    } {
    199202        keep -background -cursor
Note: See TracChangeset for help on using the changeset viewer.