Changeset 745
- Timestamp:
- Dec 4, 2009 5:11:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/liveplot
- Property rcs:date changed from 2003/08/11 19:22:46 to 2003/11/13 16:05:02
- Property rcs:lines changed from +28 -28 to +65 -12
- Property rcs:rev changed from 1.35 to 1.36
r725 r745 14 14 set exitstat 0 15 15 set expnam [lindex $argv 0] 16 if {$expnam == ""} { puts "error -- no experiment name"; set exitstat 1}16 if {$expnam == ""} {catch {puts "error -- no experiment name"}; set exitstat 1} 17 17 if $exitstat { 18 puts "usage: $argv0 expnam \[hist #\] \[legend\]" 19 destroy . 20 } 18 catch {puts "usage: $argv0 expnam \[hist #\] \[legend\]"} 19 exit 20 } 21 21 22 set program [file tail $argv0] 22 23 #set program bkgedit … … 44 45 45 46 # default values 47 set cmprdir {}; # location for the cmpr package 46 48 set weightlist {} 47 49 set graph(outname) out.ps … … 1896 1898 -helplink "expguierr.html Customizewarning" 1897 1899 } 1900 1898 1901 SetTkDefaultOptions $expgui(font) 1899 1902 … … 2034 2037 source $file 2035 2038 .a.file.menu.export add command -label $label -command $action 2036 } errmsg] { puts "error = $errmsg"}2039 } errmsg] {catch {puts "source error = $errmsg"}} 2037 2040 } 2038 2041 pack [menubutton .a.options -text Options -underline 0 -menu .a.options.menu] \ … … 2218 2221 pack $box -fill both -expand yes 2219 2222 2220 # add the extra options 2221 set fl [file join $expgui(scriptdir) icddcmd.tcl] 2222 if [file exists $fl] {source $fl} 2223 set fl [file join $expgui(scriptdir) cellgen.tcl] 2224 if [file exists $fl] {source $fl} 2223 # assume cmpr is in the same location as GSAS 2224 lappend cmprdir [file join [file dirname $expgui(scriptdir)] cmpr] 2225 2226 # append to the list a number of other likely places where CMPR might be found 2227 if {$tcl_platform(platform) == "windows"} { 2228 lappend cmprdir c:/cmpr "c:/Program files/cmpr" 2229 } else { 2230 lappend cmprdir /usr/local/cmpr ~/cmpr 2231 } 2232 # add the CMPR & LOGIC interface options 2233 set CMPR_OK 0 2234 foreach dir $cmprdir { 2235 if {[file exists [set file [file join $dir cellgen.tcl]]]} { 2236 if {[catch {source $file} errmsg]} { 2237 catch {puts "source $file error = $errmsg"} 2238 } else { 2239 if {$CMPR_OK} { 2240 catch { 2241 pack [menubutton .a.peaks -text "Peak Gen" \ 2242 -underline 0 -menu .a.peaks.menu] \ 2243 -side left 2244 menu .a.peaks.menu 2245 } 2246 .a.peaks.menu add command -label "Display a cell" \ 2247 -command {cellgen .cell} 2248 break 2249 } 2250 } 2251 } 2252 } 2253 2254 set CMPR_OK 0 2255 foreach dir $cmprdir { 2256 if {[file exists [set file [file join $dir logic icddcmd.tcl]]]} { 2257 if {[catch {source $file} errmsg]} { 2258 catch {puts "source $file error = $errmsg"} 2259 } else { 2260 if {$CMPR_OK} { 2261 catch { 2262 pack [menubutton .a.peaks -text "Peak Gen" \ 2263 -underline 0 -menu .a.peaks.menu] \ 2264 -side left 2265 menu .a.peaks.menu 2266 } 2267 .a.peaks.menu add command -label "Plot ICDD Entry" \ 2268 -command MakeLogicWin 2269 break 2270 } 2271 } 2272 } 2273 } 2225 2274 2226 2275 expload $expnam.EXP … … 2282 2331 -command plotdata 2283 2332 if {$program != "bkgedit"} { 2284 bind . <Key-$num> ".a.file.menu.tick invoke $num"2333 bind . <Key-$num> ".a.file.menu.tick invoke [.a.file.menu.tick index end]" 2285 2334 } 2286 2335 .a.options.menu.tick add command -label "Phase $num opts" \ … … 2305 2354 bind . <Key-l> {ToggleLiveCursor} 2306 2355 bind . <Key-L> {ToggleLiveCursor} 2356 # seems to be needed in OSX 2357 update 2358 wm geom . [winfo reqwidth .]x[winfo reqheight .] 2359 # 2307 2360 updateifnew 2308 2361 donewaitmsg
Note: See TracChangeset
for help on using the changeset viewer.