Changeset 2241


Ignore:
Timestamp:
May 16, 2011, 11:07:56 AM (14 years ago)
Author:
gah
Message:
 
Location:
trunk/gui/scripts
Files:
6 edited

Legend:

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

    r2175 r2241  
    569569        }
    570570    }
    571 
    572571    # if there are any valid results, add them to the resultset
    573572    if {$haveresults} {
     
    580579                set label [$xmlobj get output.$item.about.label]
    581580            }
    582 
    583581            set hidden [$xmlobj get output.$item.hide]
    584             set hidden [expr {"" != $hidden && $hidden}]
    585 
     582            if { $hidden == "" } {
     583                set hidden 0
     584            }
    586585            if {"" != $label && !$hidden} {
    587586                if {![info exists _label2page($label)]} {
     
    653652    foreach label [array names _label2page] {
    654653        set page $_label2page($label)
    655         $page.rviewer clear
     654        destroy $page.rviewer
     655        #$page.rviewer clear
    656656    }
    657657    $itk_component(resultselector) value ""
     
    968968                    set str [$_tool xml get $path.about.label]
    969969                    if {"" == $str} {
    970 1                        set str [$_tool xml element -as id $path]
     970                        set str [$_tool xml element -as id $path]
    971971                    }
    972972                    append details "$str = $val\n"
  • trunk/gui/scripts/barresult.tcl

    r1929 r2241  
    251251    }
    252252    pack $itk_component(legend) -expand yes -fill both
    253 
    254253    after idle [subst {
    255254        update idletasks
     
    901900    set g $itk_component(plot)
    902901    set elem ""
    903  
     902   
    904903    # Peek inside of Blt_ZoomStack package to see if we're currently in the
    905904    # middle of a zoom selection.
     
    11291128itcl::body Rappture::BarResult::_axis {option args} {
    11301129    set inner [$itk_component(hull).axes component inner]
    1131 
    11321130    switch -- $option {
    11331131        hilite {
  • trunk/gui/scripts/loader.tcl

    r1694 r2241  
    3434    protected method _downloadValues {}
    3535    protected method _tooltip {}
     36
     37    private method SetDefaultValue { value }
    3638
    3739    private variable _owner ""    ;# thing managing this control
     
    240242    #
    241243    set str [$_owner xml get $path.default]
    242     if {$str != ""} { after 1500 [itcl::code $this value $str] }
     244    if { $str != "" } {
     245        bind $itk_component(hull) <Map> [itcl::code $this SetDefaultValue $str]
     246    }
    243247}
    244248
     
    314318    # query tooltip on-demand based on current choice
    315319    return "@[itcl::code $this _tooltip]"
     320}
     321
     322#
     323# SetDefaultValue --
     324#
     325#       Sets the designated default value for the loader.  This must be done
     326#       after the entire application is assembled, otherwise the default
     327#       values set up by the loader will be overwritten by the various widgets
     328#       themselves when they try to set their default values. 
     329#
     330#       This is called from a  <Map> event to the loader (combobox).  This
     331#       will get trigger the first time the loader is displayed.  The binding
     332#       is then removed.
     333#
     334itcl::body Rappture::Loader::SetDefaultValue { value } {
     335    after idle [itcl::code $this value $value]
     336    # We're done. Remove the binding.
     337    bind $itk_component(hull) <Map> {}
    316338}
    317339
  • trunk/gui/scripts/visviewer.tcl

    r2237 r2241  
    2525    set _servers(vtkvis)  "localhost:2010"
    2626
    27     private variable _sid ""        ;# socket connection to server
     27    protected variable _sid ""        ;# socket connection to server
    2828    private common _done            ;# Used to indicate status of send.
    2929    private variable _buffer        ;# buffer for incoming/outgoing commands
     
    4141    protected variable _parser ""   ;# interpreter for incoming commands
    4242    protected variable _image
     43    protected variable _hostname
    4344
    4445    constructor { hostlist args } {
     
    222223            continue
    223224        }
     225        set _hostname $hostname:$port
    224226        fconfigure $_sid -translation binary -encoding binary
    225227
  • trunk/gui/scripts/vtkviewer2.tcl

    r2240 r2241  
    140140# ----------------------------------------------------------------------
    141141itcl::body Rappture::VtkViewer2::constructor {hostlist args} {
     142    puts stderr "Enter constructor: [info level -1]"
    142143
    143144    # Rebuild event
     
    338339# ----------------------------------------------------------------------
    339340itcl::body Rappture::VtkViewer2::destructor {} {
     341    Disconnect
    340342    $_dispatcher cancel !rebuild
    341343    $_dispatcher cancel !resize
     
    343345    image delete $_image(download)
    344346    array unset _settings $this-*
    345     blt::arcball destroy $_arcball
     347    catch { blt::arcball destroy $_arcball}
    346348}
    347349
     
    619621# ----------------------------------------------------------------------
    620622itcl::body Rappture::VtkViewer2::Connect {} {
     623    puts stderr "Enter Connect: [info level -1]"
    621624    set _hosts [GetServerList "vtkvis"]
    622625    if { "" == $_hosts } {
     
    625628    set result [VisViewer::Connect $_hosts]
    626629    if { $result } {
     630        puts stderr "Connected to $_hostname sid=$_sid"
    627631        set w [winfo width $itk_component(view)]
    628632        set h [winfo height $itk_component(view)]
     
    828832    FixSettings axismode
    829833
    830 
    831834    if {"" != $_first} {
    832835        set location [$_first hints camera]
     
    926929                if { $location != "" } {
    927930                    array set _view $location
    928                     parray _view
    929931                }
    930932            }
  • trunk/gui/scripts/xyresult.tcl

    r2141 r2241  
    263263# USAGE: add <dataobj> ?<settings>?
    264264#
    265 # Clients use this to add a data object to the plot.  The optional <settings>
     265# Clients use this to add a dataobj to the plot.  The optional <settings>
    266266# are used to configure the plot.  Allowed settings are -color,
    267267# -brightness, -width, -linestyle and -raise.
     
    348348# ----------------------------------------------------------------------
    349349itcl::body Rappture::XyResult::get {} {
    350     # put the data object list in order according to -raise options
    351     set dlist $_dlist
    352     foreach obj $dlist {
     350    # put the dataobj list in order according to -raise options
     351    set bottom {}
     352    set top {}
     353    foreach obj $_dlist {
    353354        if {[info exists _dataobj2raise($obj)] && $_dataobj2raise($obj)} {
    354355            set i [lsearch -exact $dlist $obj]
Note: See TracChangeset for help on using the changeset viewer.