Changeset 660


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

# on 2002/10/31 17:29:18, toby did:
do better job reporting gsas_config errors & write to file better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/expgui

    • Property rcs:date changed from 2002/09/05 18:22:20 to 2002/10/31 17:29:18
    • Property rcs:lines changed from +21 -7 to +13 -14
    • Property rcs:rev changed from 1.58 to 1.59
    r645 r660  
    141141# override options with locally defined values
    142142if {[catch {
    143     if [file exists [file join $expgui(scriptdir) localconfig]] {
    144         source [file join $expgui(scriptdir) localconfig]
    145     }
    146     if [file exists [file join ~ .gsas_config]] {
    147         source [file join ~ .gsas_config]
     143    foreach file [list \
     144                      [file join $expgui(scriptdir) localconfig] \
     145                      [file join ~ .gsas_config]] {
     146        if [file exists $file] {source $file}
    148147    }
    149148} errmsg]} {
     149    set msg "Error reading file $file (aka [file nativename $file]): $errmsg"
    150150    MyMessageBox -parent . -title "Customize warning" \
    151             -message "Error reading localconfig or .gsas_config: $errmsg" \
    152             -icon warning -type Ignore -default ignore \
    153             -helplink "expguierr.html Customizewarning"
     151        -message $msg -icon warning -type Ignore -default ignore \
     152        -helplink "expguierr.html Customizewarning"
    154153}
    155154SetTkDefaultOptions $expgui(font)
     
    534533    foreach item {archive asorttype hsorttype filesort disaglSeparateBox \
    535534            font autoexpload autoiconify autotick} {
    536         puts $fp "set expgui($item) $expgui($item)"
     535        puts $fp "set expgui($item) [list $expgui($item)]"
    537536    }
    538537    if {$tcl_platform(platform) != "windows"} {
    539         puts $fp "set env(GSASBACKSPACE) $env(GSASBACKSPACE)"
     538        puts $fp "set env(GSASBACKSPACE) [list $env(GSASBACKSPACE)]"
    540539    }
    541540    foreach v {printout legend outname outcmd autoraise color_excl \
    542541            color_obs color_calc} {
    543         puts $fp "set graph($v) $graph($v)"
     542        puts $fp "set graph($v) [list $graph($v)]"
    544543    }
    545544    foreach v {obssym obssize exclsym exclsize} {
    546         puts $fp "set peakinfo($v) $peakinfo($v)"
     545        puts $fp "set peakinfo($v) [list $peakinfo($v)]"
    547546    }
    548547    close $fp
Note: See TracChangeset for help on using the changeset viewer.