Changeset 658 for trunk/lstview
- Timestamp:
- Dec 4, 2009 5:09:51 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lstview
- Property rcs:date changed from 2002/02/11 17:32:15 to 2002/10/31 17:26:56
- Property rcs:lines changed from +4 -2 to +28 -17
- Property rcs:rev changed from 1.10 to 1.11
r560 r658 194 194 set npos [$win index "$pos+1line linestart"] 195 195 set fpos [$win index $pos-1line] 196 set pos [$win search {Summary table} $npos+1line end]197 196 198 197 if {!$txtvw(plotvars)} continue … … 200 199 # parse outs the last listed cycle number 201 200 set lstcyc {} 202 while {$fpos != "0.0" && $lstcyc == ""} {203 set line [$win get $fpos "$fpos lineend"]204 regexp {cycle *([0-9]+):} $line a lstcyc205 set fpos [$win index $fpos-1line]206 } 201 set fpos [$win search -backwards -nocase -regexp {cycle *[0-9]+ } $pos] 202 if {$fpos != ""} { 203 set end [$win index "$fpos lineend"] 204 set lstcyc [lindex [$win get $fpos $end] 1] 205 } 207 206 # get the cycle offset 208 207 set ncyc [lindex [$win get $npos "$npos lineend"] end] … … 239 238 if {$npos == $end} break 240 239 } 240 set pos [$win search {Summary table} $npos+1line end] 241 241 } 242 242 } … … 348 348 global txtvw 349 349 set fp [open [file join ~ .gsas_config] a] 350 puts $fp "set txtvw(followcycle) $txtvw(followcycle)"350 puts $fp "set txtvw(followcycle) [list $txtvw(followcycle)]" 351 351 puts $fp "set txtvw(font) [list $txtvw(font)]" 352 352 close $fp … … 385 385 } 386 386 set expgui(scriptdir) [file dirname $expgui(script) ] 387 set expgui(docdir) [file join $expgui(scriptdir) doc] 388 # location for web pages, if not found locally 389 set expgui(website) www.ncnr.nist.gov/xtal/software/expgui 387 390 388 391 source [file join $expgui(scriptdir) gsascmds.tcl] … … 390 393 391 394 # override options with locally defined values 392 if [file exists [file join $expgui(scriptdir) localconfig]] { 393 source [file join $expgui(scriptdir) localconfig] 394 } 395 if [file exists [file join ~ .gsas_config]] { 396 source [file join ~ .gsas_config] 397 } 398 395 if {[catch { 396 foreach file [list \ 397 [file join $expgui(scriptdir) localconfig] \ 398 [file join ~ .gsas_config]] { 399 if [file exists $file] {source $file} 400 } 401 } errmsg]} { 402 set msg "Error reading file $file (aka [file nativename $file]): $errmsg" 403 MyMessageBox -parent . -title "Customize warning" \ 404 -message $msg -icon warning -type Ignore -default ignore \ 405 -helplink "expguierr.html Customizewarning" 406 } 399 407 400 408 set txtvw(lastchi) {} … … 700 708 } 701 709 donewaitmsg 702 # read a file compressed file 703 if {$zfil != ""} {updatetext $zfil 0; close $zfil} 710 # read a file compressed file, if present 711 if {$zfil != ""} { 712 updatetext $zfil 713 close $zfil 714 } 704 715 # read the initial file 705 716 updatetext $lstfp
Note: See TracChangeset
for help on using the changeset viewer.