Changeset 479


Ignore:
Timestamp:
Dec 4, 2009 5:06:51 PM (13 years ago)
Author:
toby
Message:

# on 2001/10/31 20:07:41, toby did:
change excledt to run "in-line"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsascmds.tcl

    • Property rcs:date changed from 2001/10/18 23:30:15 to 2001/10/31 20:07:41
    • Property rcs:lines changed from +62 -9 to +22 -30
    • Property rcs:rev changed from 1.39 to 1.40
    r470 r479  
    10731073
    10741074# run excledt
    1075 proc excledit {"hst {}"} {
     1075proc excledit {} {
    10761076    global expgui liveplot wishshell expmap
    10771077    set expnam [file root [file tail $expgui(expfile)]]
    1078     if {$hst == ""} {
    1079         # which histograms are ready for use?
    1080         set validlist {}
    1081         foreach ihist $expmap(powderlist) {
    1082             if {[string trim [string range $expmap(htype_$ihist) 3 3]] == "" || \
    1083                     [string range $expmap(htype_$ihist) 3 3] == "*"} {
    1084 # someday support DUMMY
    1085 #                   [string range $expmap(htype_$ihist) 3 3] == "D"
    1086                 lappend validlist $ihist
    1087             }
    1088         }
    1089         if {[llength $validlist] == 0} {
    1090             MyMessageBox -parent . -title "No Valid Histograms" \
    1091                     -message "No histograms are ready to plot. Run POWPREF and try again" \
    1092                     -icon warning -helplink "expguierr.html NoValidHist"
    1093             return
    1094         }
    1095         # use $liveplot(hst) if valid, the 1st entry otherwise
    1096         if {[lsearch $validlist $liveplot(hst)] != -1} {
    1097             set hst $liveplot(hst)
    1098         } else {
    1099             set hst [lindex $validlist 0]
    1100         }
     1078    # which histograms are ready for use?
     1079    set validlist {}
     1080    foreach ihist $expmap(powderlist) {
     1081        if {[string trim [string range $expmap(htype_$ihist) 3 3]] == "" || \
     1082                [string range $expmap(htype_$ihist) 3 3] == "*" || \
     1083                [string range $expmap(htype_$ihist) 3 3] == "D"} {
     1084            lappend validlist $ihist
     1085        }
     1086    }
     1087    if {[llength $validlist] == 0} {
     1088        MyMessageBox -parent . -title "No Valid Histograms" \
     1089                -message "No histograms are ready to plot. Run POWPREF and try again" \
     1090                -icon warning -helplink "expguierr.html NoValidHist"
     1091        return
    11011092    }
    11021093    if {$expgui(autoiconify)} {wm iconify .}
    1103     exec $wishshell [file join $expgui(scriptdir) excledt] \
    1104             $expnam $hst $liveplot(legend)
     1094    StartExcl
    11051095    if {$expgui(autoiconify)} {wm deiconify .}
    1106     # check for changes in the .EXP file immediately
    1107     whenidle
    11081096}
    11091097
     
    13341322    set expnam [file rootname $expgui(expfile)]
    13351323    # get the last archived version
    1336     set lastf [lindex [lsort [glob $expnam.{O\[0-9A-F\]\[0-9A-F\]}]] end]
     1324    set lastf [lindex [lsort [glob -nocomplain $expnam.{O\[0-9A-F\]\[0-9A-F\]}]] end]
    13371325    if {$lastf == ""} {
    13381326        set num 01
     
    24562444                -e /bin/sh -c [list $command] $suffix} errmsg
    24572445        if $expgui(debug) {puts "xterm result = $errmsg"}
    2458         if {$wait && $expgui(autoiconify)} {wm deiconify .}
    2459     }
    2460 }
     2446        if {$wait} {
     2447            if {$expgui(autoiconify)} {wm deiconify .}
     2448            # check for changes in the .EXP file immediately
     2449            whenidle
     2450        }
     2451    }
     2452}
Note: See TracChangeset for help on using the changeset viewer.