Changeset 362
- Timestamp:
- Dec 4, 2009 5:04:54 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/liveplot
- Property rcs:date changed from 2000/05/26 14:06:54 to 2000/12/22 19:44:07
- Property rcs:lines changed from +5 -3 to +30 -12
- Property rcs:rev changed from 1.13 to 1.14
r153 r362 40 40 set graph(xunits) 0 41 41 set graph(yunits) 0 42 set graph(autoraise) 1 42 43 set expgui(debug) 0 43 44 catch {if $env(DEBUG) {set expgui(debug) 1}} … … 173 174 174 175 proc readdata {box} { 175 global expgui 176 global expgui modtime expnam 176 177 if [catch { 178 set modtime [file mtime $expnam.EXP] 177 179 set loadtime [time { 178 180 if {$expgui(tcldump) == ""} { … … 718 720 puts $fp "set graph(outname) $graph(outname)" 719 721 puts $fp "set graph(outcmd) $graph(outcmd)" 722 puts $fp "set graph(autoraise) $graph(autoraise)" 720 723 puts $fp "set expgui(lblfontsize) $expgui(lblfontsize)" 721 724 puts $fp "set expgui(fadetime) $expgui(fadetime)" … … 751 754 752 755 proc updateifnew {} { 753 global cycle modtime expnam 756 global cycle modtime expnam env tcl_platform graph 757 # has the .EXP file been changed? 754 758 if {[file mtime $expnam.EXP] != $modtime} { 755 set modtime [file mtime $expnam.EXP] 756 set newcycle [getcycle] 757 if {$newcycle != $cycle} { 758 set cycle $newcycle 759 # delay one second 760 # after 1000 761 readdata .g 762 } 763 } 764 # check every second 759 # are we in windows and are "locked?" If not, OK to update 760 if {$tcl_platform(platform) == "windows" && [file exists expgui.lck]} { 761 .g config -title "(Experiment directory locked)" 762 } else { 763 set modtime [file mtime $expnam.EXP] 764 set newcycle [getcycle] 765 if {$newcycle != $cycle} { 766 set cycle $newcycle 767 readdata .g 768 } 769 if {$tcl_platform(platform) == "windows" && $graph(autoraise)} { 770 # raise does not seem to be global in Windows, 771 # but this works in Win-95 772 # nothing seems to work in Win-NT 773 wm withdraw . 774 wm deiconify . 775 } elseif {$graph(autoraise)} { 776 raise . 777 } 778 } 779 } 780 # check again in a second 765 781 after 1000 updateifnew 766 782 } … … 938 954 -command {setlegend $box $graph(legend)} 939 955 .a.options.menu add command -label "Set PS output" -command setpostscriptout 956 .a.options.menu add checkbutton -label "Raise on update" \ 957 -variable graph(autoraise) 940 958 .a.options.menu add command -label "Save Options" -underline 1 \ 941 959 -command "SaveOptions"
Note: See TracChangeset
for help on using the changeset viewer.