Changeset 659 for trunk/liveplot


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/liveplot

    • Property rcs:date changed from 2002/10/24 19:24:01 to 2002/10/31 17:28:17
    • Property rcs:lines changed from +40 -2 to +17 -11
    • Property rcs:rev changed from 1.29 to 1.30
    r655 r659  
    937937    set fp [open [file join ~ .gsas_config] a]
    938938    foreach v {printout legend outname outcmd autoraise chi2} {
    939         puts $fp "set graph($v) $graph($v)"
     939        puts $fp "set graph($v) [list $graph($v)]"
    940940    }
    941941    foreach v {diff chi2 bkg calc obs input fit} {
    942         puts $fp "set graph(color_$v) $graph(color_$v)"
     942        puts $fp "set graph(color_$v) [list $graph(color_$v)]"
    943943    }
    944944    foreach v {font lblfontsize fadetime hklbox pixelregion autotick} {
    945         puts $fp "set expgui($v) $expgui($v)"
     945        puts $fp "set expgui($v) [list $expgui($v)]"
    946946    }
    947947    foreach v {obssym obssize inpsym inpsize} {
    948         puts $fp "set peakinfo($v) $peakinfo($v)"
     948        puts $fp "set peakinfo($v) [list $peakinfo($v)]"
    949949    }
    950950    close $fp
     
    18661866
    18671867# override options with locally defined values
    1868 if [file exists [file join $expgui(scriptdir) localconfig]] {
    1869     source [file join $expgui(scriptdir) localconfig]
    1870 }
    1871 if [file exists [file join ~ .gsas_config]] {
    1872     source [file join ~ .gsas_config]
     1868if {[catch {
     1869    foreach file [list \
     1870                      [file join $expgui(scriptdir) localconfig] \
     1871                      [file join ~ .gsas_config]] {
     1872        if [file exists $file] {source $file}
     1873    }
     1874} errmsg]} {
     1875    set msg "Error reading file $file (aka [file nativename $file]): $errmsg"
     1876    MyMessageBox -parent . -title "Customize warning" \
     1877        -message $msg -icon warning -type Ignore -default ignore \
     1878        -helplink "expguierr.html Customizewarning"
    18731879}
    18741880SetTkDefaultOptions $expgui(font)
Note: See TracChangeset for help on using the changeset viewer.