Changeset 71
- Timestamp:
- Dec 4, 2009 4:59:55 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/expgui
- Property rcs:date changed from 1999/02/22 20:03:00 to 1999/03/19 17:07:59
- Property rcs:lines changed from +17 -12 to +23 -19
- Property rcs:rev changed from 1.11 to 1.12
r63 r71 235 235 } 236 236 237 proc CreateNewExp {} {238 global expgui239 set newexpfile [newexp]240 if {$newexpfile == ""} return241 # create an "empty" exp file242 createexp $newexpfile \243 [getstring "title for experiment $newexpfile" 60 0]244 set expgui(expfile) $newexpfile245 catch {cd [string trim [file dirname $expgui(expfile)]]}246 loadexp $expgui(expfile)247 }248 249 237 proc SaveAsFile {} { 250 238 global expgui 251 239 set newexpfile [getExpFileName new] 252 240 if {$newexpfile == ""} return 241 expwrite $newexpfile 253 242 set expgui(expfile) $newexpfile 254 243 catch {cd [string trim [file dirname $expgui(expfile)]]} 255 expwrite $expgui(expfile)256 244 set expgui(changed) 0 257 245 set expgui(expModifiedLast) [file mtime $expgui(expfile)] … … 278 266 set newexpfile [getExpFileName old] 279 267 if {$newexpfile == ""} return 268 269 if ![file exists $newexpfile] { 270 # you've been warned this .EXP does not exist! 271 # create an "empty" exp file 272 createexp $newexpfile \ 273 [getstring "title for experiment $newexpfile" 60 0] 274 } 280 275 set expgui(expfile) $newexpfile 281 276 catch {cd [string trim [file dirname $expgui(expfile)]]} … … 285 280 SelectOnePhase [lindex $expmap(phaselist) 0] 286 281 # select the first histogram in the list by default (if there are any) 287 if {[llength $expmap(histlistboxcontents)] > 0} {set expgui(curhist) 0} 282 if {[llength $expmap(histlistboxcontents)] > 0} { 283 set expgui(curhist) 0 284 } else { 285 set expgui(curhist) {} 286 } 288 287 if !$expgui(havetix) { 289 288 RaisePage lsFrame … … 563 562 set crsPhase $num 564 563 # no phase is selected 565 if {$crsPhase == "" } {564 if {$crsPhase == "" || [llength $expmap(phaselist)] == 0} { 566 565 # disable traces on entryvar 567 566 set entrycmd(trace) 0 … … 572 571 set entryvar($ent) "" 573 572 } 573 set expgui(curPhase) {} 574 574 # enable traces on entryvar 575 575 set entrycmd(trace) 1 … … 1237 1237 grid [ entry $expgui(diffBox).eDCipola -width 2 \ 1238 1238 -textvariable entryvar(ipola)] -column 6 -row 4 1239 -variable entryvar(zref) ] -column 2 -row 31240 1239 } elseif {[string range $expmap(htype_$hist) 1 2] == "XE"} { 1241 1240 #------------- … … 1587 1586 set row 1 1588 1587 set nterms [hapinfo $hist $i profterms] 1589 set lbls $expgui(prof-$htype-$ptype) 1588 set lbls {} 1589 catch {set lbls $expgui(prof-$htype-$ptype)} 1590 1590 # for type 4, add extra terms depending on the cell type 1591 1591 if {$ptype == 4} {set lbls [type4lbls $lbls $nterms $i]} … … 2999 2999 SelectOnePhase [lindex $expmap(phaselist) 0] 3000 3000 # select the first histogram in the list by default (if there are any) 3001 if {[llength $expmap(histlistboxcontents)] > 0} {set expgui(curhist) 0} 3001 if {[llength $expmap(histlistboxcontents)] > 0} { 3002 set expgui(curhist) 0 3003 } else { 3004 set expgui(curhist) {} 3005 } 3002 3006 3003 3007 if !$expgui(havetix) {
Note: See TracChangeset
for help on using the changeset viewer.