Changeset 6231 for branches/1.7/gui


Ignore:
Timestamp:
Apr 1, 2016 10:28:56 AM (8 years ago)
Author:
gah
Message:

fix: code to _job(exitcode) in task.tcl, add -nosim configuration option to pager, use -nosim in analyzer to prevent automatically simulating when switching pages

Location:
branches/1.7/gui/scripts
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/gui/scripts/analyzer.tcl

    r6205 r6231  
    451451# ----------------------------------------------------------------------
    452452itcl::body Rappture::Analyzer::simulate {args} {
    453     #puts "simulate args='$args'"
    454453
    455454    set uq [$_tool get_uq -uq_type smolyak -uq_args 2]
     
    19571956    configure -notebookpage analyze
    19581957    global win
     1958    $win.pager configure -nosim 1
    19591959    $win.pager current analyzer
     1960    $win.pager configure -nosim 0
    19601961   if 0 {
    19611962    # Load the inputs for the very last run
  • branches/1.7/gui/scripts/main.tcl

    r6103 r6231  
    405405
    406406foreach path [array names ::Rappture::parameters] {
     407    if { $path == "simset" } {
     408        continue;                       # Don't consider file(simset)
     409    }
    407410    set fname $::Rappture::parameters($path)
    408     if {[catch {
    409           set fid [open $fname r]
    410           set info [read $fid]
    411           close $fid}] == 0} {
    412 
    413         set w [$tool widgetfor $path]
    414         if {$w ne ""} {
    415             if {[catch {$w value [string trim $info]} result]} {
    416                 puts stderr "WARNING: bad tool parameter value for \"$path\""
    417                 puts stderr "  $result"
    418             }
    419         } else {
    420             puts stderr "WARNING: can't find control for tool parameter: $path"
    421         }
     411    if { ![file exists $fname] } {
     412        puts stderr "WARNING: tool parameters file \"$fname\" doesn't exist"
     413        continue;                       # Can't find parameters file
     414    }       
     415    if { ![file readable $fname] } {
     416        puts stderr "WARNING: can't read tool parameters file \"$fname\""
     417        continue;                       # Can't read parameters file
     418    }
     419    set f [open $fname r]
     420    set contents [read $f]
     421    close $f
     422   
     423    set w [$tool widgetfor $path]
     424    if { $w == "" } {
     425        puts stderr "WARNING: can't find control for tool parameter: $path"
     426        continue;                       # Can't find rappture control for path
     427    }
     428    if {[catch {$w value [string trim $info]} result]} {
     429        puts stderr "WARNING: bad tool parameter value for \"$path\""
     430        puts stderr "  $result"
    422431    }
    423432}
  • branches/1.7/gui/scripts/pager.tcl

    r5679 r6231  
    6767    private variable _page2info      ;# maps page name => -frame,-title,-command
    6868    private variable _current ""     ;# page currently shown
     69    public variable nosim 0
    6970}
    7071
     
    374375            # invoke it now.
    375376            #
    376             if {"" != $_current
    377                   && [string length $_page2info($_current-command)] > 0} {
     377            if {"" != $_current && !$nosim &&
     378                  [string length $_page2info($_current-command)] > 0} {
    378379                uplevel #0 $_page2info($_current-command)
    379380            }
Note: See TracChangeset for help on using the changeset viewer.