Changeset 661


Ignore:
Timestamp:
Dec 4, 2009 5:09:54 PM (11 years ago)
Author:
toby
Message:

# on 2002/10/31 17:32:06, toby did:
trap gsas_config errors & write to file better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/widplt

    • Property rcs:date changed from 2002/01/25 21:30:17 to 2002/10/31 17:32:06
    • Property rcs:lines changed from +2 -2 to +23 -13
    • Property rcs:rev changed from 1.11 to 1.12
    r558 r661  
    669669    global graph
    670670    set fp [open [file join ~ .gsas_config] a]
    671     puts $fp "set graph(legend) $graph(legend)"
    672     puts $fp "set graph(printout) $graph(printout)"
    673     puts $fp "set graph(outname) $graph(outname)"
    674     puts $fp "set graph(outcmd) $graph(outcmd)"
    675     puts $fp "set graph(plotunits) $graph(plotunits)"
    676     puts $fp "set graph(equivwave) $graph(equivwave)"
     671    puts $fp "set graph(legend) [list $graph(legend)]"
     672    puts $fp "set graph(printout) [list $graph(printout)]"
     673    puts $fp "set graph(outname) [list $graph(outname)]"
     674    puts $fp "set graph(outcmd) [list $graph(outcmd)]"
     675    puts $fp "set graph(plotunits) [list $graph(plotunits)]"
     676    puts $fp "set graph(equivwave) [list $graph(equivwave)]"
    677677    close $fp
    678678}
     
    978978}
    979979set expgui(scriptdir) [file dirname $expgui(script) ]
     980set expgui(docdir) [file join $expgui(scriptdir) doc]
     981# location for web pages, if not found locally
     982set expgui(website) www.ncnr.nist.gov/xtal/software/expgui
    980983
    981984# fetch EXP file processing routines
    982985source [file join $expgui(scriptdir) readexp.tcl]
     986source [file join $expgui(scriptdir) gsascmds.tcl]
    983987
    984988# override options with locally defined values
    985 if [file exists [file join $expgui(scriptdir) localconfig]] {
    986     source [file join $expgui(scriptdir) localconfig]
    987 }
    988 if [file exists [file join ~ .gsas_config]] {
    989     source [file join ~ .gsas_config]
     989if {[catch {
     990    foreach file [list \
     991                      [file join $expgui(scriptdir) localconfig] \
     992                      [file join ~ .gsas_config]] {
     993        if [file exists $file] {source $file}
     994    }
     995} errmsg]} {
     996    set msg "Error reading file $file (aka [file nativename $file]): $errmsg"
     997    MyMessageBox -parent . -title "Customize warning" \
     998        -message $msg -icon warning -type Ignore -default ignore \
     999        -helplink "expguierr.html Customizewarning"
    9901000}
    9911001#----------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.