Changeset 1978 for trunk


Ignore:
Timestamp:
Dec 7, 2010 1:15:28 PM (13 years ago)
Author:
braffert
Message:

Adding getRunFile method to tool.tcl

File:
1 edited

Legend:

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

    r1929 r1978  
    2828    public method run {args}
    2929    public method abort {}
     30    public method getRunFile {}
    3031
    3132    protected method _mkdir {dir}
     
    3435    private variable _installdir ""  ;# installation directory for this tool
    3536    private variable _outputcb ""    ;# callback for tool output
     37    private variable _runFile ""     ;# location of last created run.xml
    3638    private common job               ;# array var used for blt::bgexec jobs
    3739    private common jobnum 0          ;# counter for unique job number
     
    260262    # see if the job was aborted
    261263    if {[regexp {^KILLED} $job(control)]} {
     264        set _runFile ""
    262265        return [list 0 "ABORT"]
    263266    }
     
    287290                }
    288291            }
     292            set _runFile $file
    289293        } else {
    290294            set status 1
    291295            set result "Can't find result file in output.\nDid you call Rappture
    292296::result in your simulator?"
     297            set _runFile ""
    293298        }
    294299        return [list $status $result]
     
    337342    }
    338343}
     344
     345# ----------------------------------------------------------------------
     346# USAGE: getRunFile
     347#
     348# Returns the file name of the last generated run.xml, as opposed to a
     349# library object as returned by the run method.
     350# ----------------------------------------------------------------------
     351itcl::body Rappture::Tool::getRunFile {} {
     352    return $_runFile
     353}
     354
Note: See TracChangeset for help on using the changeset viewer.