Ignore:
Timestamp:
Sep 22, 2008, 5:41:59 PM (16 years ago)
Author:
dkearney
Message:

updated driver to allow the user to revisualize old run files just as rerun did. if driver can find the tool.xml file and where the application is installed, it can also allow the user to run new simulations after preloading old simulations.

Finally figured out where the current tags in group objects were coming from. controlOwner was adjusted to stop putting current tags in things. this only seemed to happen when the application also contained a loader, because we were doing an xml copy of nodes.

rewrote rerun to be a small wrapper around the "driver -load" command. rerun is now a script like rappture, it is populated with rappture's install directory from configure, so configure.in was updated. added some stuff for finding mcc in the configure.in script for a future commit

changed Rappture::Analyzer to accept -notebookpage configure flag so we can specify which page of the analyzer notebook should be currently showing. also inside of the analyzer, changed behavior of simstatus to allow us to still show a message even if the simulation button is disabled. this is helpful because we can tell the user why the simulation button is grayed out. one example of this is the case when we load old run.xml files, but cannot find a tool.xml file. the user cannot run a simulation, even if they change an input, because we can't figure out where the app is installed. now we can tell the user, why they cannot run the simulation.

File:
1 edited

Legend:

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

    r1124 r1159  
    2424option add *Analyzer.simControlActiveBackground #ffffcc widgetDefault
    2525option add *Analyzer.simControlActiveOutline black widgetDefault
     26option add *Analyzer.notebookpage "about" widgetDefault
    2627
    2728option add *Analyzer.font \
     
    4647    itk_option define -simcontrolactivebackground simControlActiveBackground Background ""
    4748    itk_option define -holdwindow holdWindow HoldWindow ""
     49    itk_option define -notebookpage notebookPage NotebookPage ""
    4850
    4951    constructor {tool args} { # defined below }
     
    6264    protected method _fixSize {}
    6365    protected method _fixSimControl {}
     66    protected method _fixNotebook {}
    6467    protected method _simState {state args}
    6568    protected method _simOutput {message}
     
    820823# Used internally to change the "Simulation" button on or off.
    821824# If the <boolean> is on, then any <message> and <settings> are
    822 # displayed as well.  The <message> is a note to the user about
     825# displayed as well.  If the <boolean> is off, then only display
     826# the message. The <message> is a note to the user about
    823827# what will be simulated, and the <settings> are a list of
    824828# tool parameter settings of the form {path1 val1 path2 val2 ...}.
     
    893897        $itk_component(simstatus) configure -state normal
    894898        $itk_component(simstatus) delete 1.0 end
    895         $itk_component(simstatus) configure -state disabled
    896         Rappture::Tooltip::for $itk_component(simstatus) ""
     899        set mesg [lindex $args 0]
     900        if {"" != $mesg} {
     901            $itk_component(simstatus) insert end $mesg
     902        }
    897903    }
    898904}
     
    10251031
    10261032# ----------------------------------------------------------------------
     1033# USAGE: _fixNotebook
     1034#
     1035# Used internally to switch the active notebook page
     1036# ----------------------------------------------------------------------
     1037itcl::body Rappture::Analyzer::_fixNotebook {} {
     1038    switch -- $itk_option(-notebookpage) {
     1039        about {
     1040            $itk_component(notebook) current about
     1041        }
     1042        simulate {
     1043            $itk_component(notebook) current simulate
     1044        }
     1045        analyze {
     1046            $itk_component(notebook) current analyze
     1047        }
     1048        default {
     1049            error "bad value \"$itk_option(-notebookpage)\": should be about, simulate, analyze"
     1050        }
     1051    }
     1052}
     1053
     1054# ----------------------------------------------------------------------
    10271055# CONFIGURATION OPTION: -simcontrol
    10281056#
     
    10331061    _fixSimControl
    10341062}
     1063
     1064# ----------------------------------------------------------------------
     1065# CONFIGURATION OPTION: -notebookpage
     1066#
     1067# Controls which page of the analyzer notebook is shown. It is
     1068# particularly needed when using rerun, when you don't want to
     1069# "simulate -ifneeded" because an actual simulation might be
     1070# kicked off due to differences between tool.xml and run.xml
     1071# ----------------------------------------------------------------------
     1072itcl::configbody Rappture::Analyzer::notebookpage {
     1073    _fixNotebook
     1074}
Note: See TracChangeset for help on using the changeset viewer.