- Timestamp:
- Feb 18, 2016 4:13:14 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
-
trunk/gui/apps/rappture.use.in
r4657 r6021 1 1 2 2 conflict RAPPTURE_CHOICE 3 4 use -r -e anaconda-2.3.0 5 use -r -e puq-2.2.14 3 6 4 7 desc "The Rappture tool environment (released version)." -
trunk/gui/scripts/Makefile.in
r5959 r6021 94 94 $(srcdir)/periodictable.tcl \ 95 95 $(srcdir)/postern.tcl \ 96 $(srcdir)/probdisteditor.tcl \ 96 97 $(srcdir)/progress.tcl \ 97 98 $(srcdir)/pushbutton.tcl \ 98 99 $(srcdir)/radiodial.tcl \ 99 100 $(srcdir)/resultset.tcl \ 101 $(srcdir)/response.tcl \ 102 $(srcdir)/responseviewer.tcl \ 100 103 $(srcdir)/resultselector.tcl \ 101 104 $(srcdir)/resultviewer.tcl \ … … 121 124 $(srcdir)/units.tcl \ 122 125 $(srcdir)/utils.tcl \ 126 $(srcdir)/uq.tcl \ 127 $(srcdir)/uqcurve.tcl \ 128 $(srcdir)/uqinfo.tcl \ 129 $(srcdir)/uqnotebook.tcl \ 123 130 $(srcdir)/valueresult.tcl \ 124 131 $(srcdir)/videochooser.tcl \ … … 157 164 --outfile tclIndex 158 165 159 install: all install_scripts install_images 166 install: all install_scripts install_images 160 167 161 install_scripts: 168 install_scripts: 162 169 $(MKDIR_P) -m 0755 $(destdir) 163 170 @for i in $(FILES); do \ 164 171 echo "Installing $$i" ; \ 165 172 $(INSTALL) -m 0444 $$i $(destdir) ; \ 166 done 173 done 167 174 $(INSTALL) -m 0444 tclIndex $(destdir) 168 175 … … 172 179 echo "Installing $$i" ; \ 173 180 $(INSTALL) -m 0444 $$i $(destdir)/images ; \ 174 done 181 done 175 182 176 183 clean: -
trunk/gui/scripts/analyzer.tcl
r5880 r6021 79 79 protected method _lammpsToSequence {xmlobj path id child data} 80 80 protected method _trajToSequence {xmlobj {path ""}} 81 protected method _pop_uq_dialog {win} 82 protected method _setWaitVariable {state} 83 protected method _adjust_level {win} 81 84 82 85 private variable _tool "" ;# belongs to this tool … … 92 95 private variable _lastPlot 93 96 private common job ;# array var used for blt::bgexec jobs 97 private variable _uq_active 0 ;# a UQ variables has been used 98 private variable _wait_uq 0 94 99 } 95 100 … … 328 333 } 329 334 pack $itk_component(resultpages) -expand yes -fill both 330 331 set f [$itk_component(results) insert end -fraction 0.1] 335 set f [$itk_component(results) insert end -fraction 0.1] 332 336 itk_component add resultselector { 333 337 Rappture::ResultSelector $f.rsel -resultset $_resultset \ … … 395 399 # ---------------------------------------------------------------------- 396 400 itcl::body Rappture::Analyzer::simulate {args} { 397 if {$args == "-ifneeded"} { 401 #puts "simulate args='$args'" 402 403 set uq [$_tool get_uq -uq_type smolyak -uq_args 2] 404 405 # pop up UQ window 406 if {[$uq num_runs] > 1} { 407 set _uq_active 1 408 set status [$uq run_dialog $itk_component(simulate)] 409 if {$status == 0} { 410 # cancelled 411 return 412 } 413 lappend args -uq_type [$uq type] 414 lappend args -uq_args [$uq args] 415 # Need to put these UQ values into the driver file 416 # so the call to resultset::contains will be correct. 417 set _xml [$_tool xml object] 418 $_xml put uq.type.current [$uq type] 419 $_xml put uq.args.current [$uq args] 420 $_xml put uq.args.about.label "level" 421 $_xml put uq.args.about.description "Polynomial Degree of Smolyak GPC method." 422 } 423 #puts "simulate args=$args" 424 425 if {[lindex $args 0] == "-ifneeded"} { 398 426 # check to see if simulation is really needed 399 427 $_tool sync … … 404 432 return 405 433 } 406 set args ""434 set args [lreplace $args 0 0] 407 435 } 408 436 … … 427 455 428 456 # execute the job 457 #puts "$_tool run $args" 458 429 459 foreach {status result} [eval $_tool run $args] break 430 460 … … 470 500 } 471 501 502 472 503 # ---------------------------------------------------------------------- 473 504 # USAGE: reset ?-eventually|-now? … … 515 546 clear 516 547 } 548 #puts "Analyzer::load" 517 549 $_resultset add $xmlobj 518 550 … … 652 684 # ---------------------------------------------------------------------- 653 685 itcl::body Rappture::Analyzer::_plot {args} { 686 #puts "analyzer::_plot" 654 687 set _plotlist $args 655 688 … … 755 788 } elseif {$page != ""} { 756 789 set _lastlabel $name 757 set win [winfo toplevel $itk_component(hull)]758 790 $itk_component(resultpages) current $page 759 791 set f [$itk_component(resultpages) page $page] 760 761 792 # We don't want to replot if we're using an existing viewer with the 762 793 # the same list of objects to plot. So track the viewer and the list. 763 794 if { ![info exists _lastPlot($f)] || $_plotlist != $_lastPlot($f) } { 764 795 set _lastPlot($f) $_plotlist 796 set win [winfo toplevel $itk_component(hull)] 765 797 blt::busy hold $win 798 #puts "rviewer = $f.rviewer" 799 #puts "_plotlist = $_plotlist" 766 800 $f.rviewer plot clear 767 801 eval $f.rviewer plot add $_plotlist 768 blt::busy release [winfo toplevel $itk_component(hull)]802 blt::busy release $win 769 803 } 770 804 Rappture::Logger::log output $_label2item($name) … … 782 816 # ---------------------------------------------------------------------- 783 817 itcl::body Rappture::Analyzer::_fixResultSet {args} { 818 #puts "Analyzer::_fixResultSet $args" 784 819 array set eventData $args 785 820 switch -- $eventData(op) { … … 794 829 set haveresults 0 795 830 foreach item [_reorder [$xmlobj children output]] { 796 switch -glob -- $item { 797 log* { 798 _autoLabel $xmlobj output.$item "Output Log" counters 799 } 800 number* { 801 _autoLabel $xmlobj output.$item "Number" counters 802 } 803 integer* { 804 _autoLabel $xmlobj output.$item "Integer" counters 805 } 806 mesh* { 807 _autoLabel $xmlobj output.$item "Mesh" counters 808 } 809 string* { 810 _autoLabel $xmlobj output.$item "String" counters 811 } 812 histogram* - curve* - field* { 813 _autoLabel $xmlobj output.$item "Plot" counters 814 } 815 map* { 816 _autoLabel $xmlobj output.$item "Map" counters 817 } 818 drawing* { 819 _autoLabel $xmlobj output.$item "Drawing" counters 820 } 821 structure* { 822 _autoLabel $xmlobj output.$item "Structure" counters 823 } 824 table* { 825 _autoLabel $xmlobj output.$item "Energy Levels" counters 826 } 827 sequence* { 828 _autoLabel $xmlobj output.$item "Sequence" counters 831 if {[$xmlobj get output.$item.about.uqtype] == ""} { 832 switch -glob -- $item { 833 log* { 834 _autoLabel $xmlobj output.$item "Output Log" counters 835 } 836 number* { 837 _autoLabel $xmlobj output.$item "Number" counters 838 } 839 integer* { 840 _autoLabel $xmlobj output.$item "Integer" counters 841 } 842 mesh* { 843 _autoLabel $xmlobj output.$item "Mesh" counters 844 } 845 string* { 846 _autoLabel $xmlobj output.$item "String" counters 847 } 848 histogram* - curve* - field* { 849 _autoLabel $xmlobj output.$item "Plot" counters 850 } 851 drawing* { 852 _autoLabel $xmlobj output.$item "Drawing" counters 853 } 854 structure* { 855 _autoLabel $xmlobj output.$item "Structure" counters 856 } 857 table* { 858 _autoLabel $xmlobj output.$item "Energy Levels" counters 859 } 860 sequence* { 861 _autoLabel $xmlobj output.$item "Sequence" counters 862 } 829 863 } 830 864 } … … 853 887 } 854 888 set hidden [$xmlobj get output.$item.hide] 855 if { $hidden == ""} {889 if {$hidden == ""} { 856 890 set hidden 0 857 891 } 858 892 if {"" != $label && !$hidden} { 893 set uq_part [$xmlobj get output.$item.about.uqtype] 894 895 #puts "label=$label uq_part=$uq_part" 896 859 897 if {![info exists _label2page($label)]} { 898 #puts "Adding label: '$label'" 860 899 set name "page[incr _pages]" 900 #puts "Inserting $name into resultpages" 861 901 set page [$itk_component(resultpages) \ 862 902 insert end $name] … … 884 924 set reset($page) 1 885 925 } 886 $page.rviewer add $index $xmlobj output.$item 926 $page.rviewer add $index $xmlobj output.$item $label $uq_part 887 927 } 888 928 } … … 1037 1077 configure -simcontrolcolor $simcbg 1038 1078 1039 $itk_component(simulate) configure -state disabled 1079 if {$_uq_active == 0} { 1080 $itk_component(simulate) configure -state disabled 1081 } 1040 1082 $itk_component(abort) configure -state normal 1041 1083 … … 1065 1107 # Scan through and pick out any =RAPPTURE-PROGRESS=> messages first. 1066 1108 # 1109 1067 1110 while {[regexp -indices \ 1068 1111 {=RAPPTURE-PROGRESS=> *([-+]?[0-9]+) +([^\n]*)(\n|$)} $message \ … … 1080 1123 foreach {i0 i1} $match break 1081 1124 set message [string replace $message $i0 $i1] 1125 } 1126 1127 # 1128 # Now handle SUBMIT-PROGRESS 1129 # 1130 while {[regexp -indices {=SUBMIT-PROGRESS=> aborted=([0-9]+) finished=([0-9]+) failed=([0-9]+) executing=([0-9]+)\ 1131 waiting=([0-9]+) setting_up=([0-9]+) setup=([0-9]+) %done=([0-9.]+) timestamp=([0-9.]+)(\n|$)} $message \ 1132 match aborted finished failed executing waiting setting_up setup percent ts mesg]} { 1133 1134 set mesg "" 1135 foreach {i0 i1} $percent break 1136 set percent [string range $message $i0 $i1] 1137 foreach {i0 i1} $failed break 1138 set failed [string range $message $i0 $i1] 1139 foreach {i0 i1} $match break 1140 set message [string replace $message $i0 $i1] 1141 1142 if {$failed != 0} {set mesg "$failed jobs failed!"} 1143 if {$percent >= 100} { set mesg "Jobs finished. Analyzing results..."} 1144 1145 pack $itk_component(progress) -fill x -padx 10 -pady 10 1146 $itk_component(progress) settings -percent $percent -message $mesg 1082 1147 } 1083 1148 -
trunk/gui/scripts/gauge.tcl
r5659 r6021 42 42 itk_option define -sampleheight sampleHeight SampleHeight 0 43 43 itk_option define -log log Log "" 44 itk_option define -varname varname Varname "" 45 itk_option define -label label Label "" 44 46 itk_option define -validatecommand validateCommand ValidateCommand "" 47 itk_option define -uq uq Uq no 45 48 46 49 constructor {args} { # defined below } … … 57 60 protected method _layout {} 58 61 protected method _log {event args} 62 protected method _change_param_type {choice} 63 protected method _pop_uq {win} 64 protected method _pop_uq_deactivate {} 59 65 60 66 private variable _value 0 ;# value for this widget 67 private variable _mode exact ;# current mode 68 private variable _pde "" ;# ProbDistEditor 69 private variable _val "" ;# value choice combobox 70 private variable uq no 61 71 62 72 blt::bitmap define GaugeArrow { … … 77 87 # ---------------------------------------------------------------------- 78 88 itcl::body Rappture::Gauge::constructor {args} { 89 # puts "GAUGE CONS: $args" 90 array set attrs $args 91 79 92 itk_option remove hull.borderwidth hull.relief 80 93 component hull configure -borderwidth 0 … … 90 103 bind $itk_component(icon) <Configure> [itcl::code $this _redraw] 91 104 105 if {[info exists attrs(-uq)]} { 106 set uq $attrs(-uq) 107 if {[string is true $uq]} { 108 set uq 1 109 itk_component add uq { 110 button $itk_interior.uq -image [Rappture::icon UQ] \ 111 -command [itcl::code $this _pop_uq $itk_interior] 112 } 113 pack $itk_component(uq) -side right -padx 10 114 } else { 115 set uq 0 116 } 117 } else { 118 set uq 0 119 } 120 92 121 itk_component add -protected vframe { 93 122 frame $itk_interior.vframe … … 97 126 98 127 itk_component add value { 99 label $itk_component(vframe).value -width 7\128 label $itk_component(vframe).value -width 20 \ 100 129 -borderwidth 1 -relief flat -textvariable [itcl::scope _value] 101 130 } { … … 199 228 # ---------------------------------------------------------------------- 200 229 itcl::body Rappture::Gauge::value {args} { 201 set onlycheck 0 230 #puts "Gauge value: $args" 231 232 # Query. Just return the current value. 233 if {[llength $args] == 0} { 234 return $_value 235 } 236 202 237 set i [lsearch -exact $args -check] 203 238 if {$i >= 0} { 204 239 set onlycheck 1 205 240 set args [lreplace $args $i $i] 206 } 207 208 if {[llength $args] == 1} { 209 # 210 # If this gauge has -units, try to convert the incoming 211 # value to that system of units. Also, make sure that 212 # the value is bound by any min/max value constraints. 213 # 214 # Keep track of the inputted units so we can give a 215 # response about min and max values in familiar units. 216 # 217 set newval [set nv [string trim [lindex $args 0]]] 218 set units $itk_option(-units) 219 if {"" != $units} { 220 set newval [Rappture::Units::convert $newval -context $units] 221 set nvUnits [Rappture::Units::Search::for $newval] 222 if { "" == $nvUnits} { 223 set msg [Rappture::Units::description $units] 224 error "unrecognized units in value \"$newval\": should be value with units of $msg" 225 } 226 set nv [Rappture::Units::convert $nv \ 227 -context $units -to $units -units off] 228 229 # Normalize the units name 230 set newval [Rappture::Units::convert $newval -units off]$nvUnits 231 } 232 233 switch -- $itk_option(-type) { 234 integer { 235 if { [scan $nv "%g" value] != 1 || int($nv) != $value } { 236 error "bad value \"$nv\": should be an integer value" 237 } 238 } 239 real { 240 # "scan" will reject the number if the string is "NaN" or 241 # "Inf" or the empty string. It also is accepts large numbers 242 # (e.g. 111111111111111111111) that "string is double" 243 # rejects. The problem with "scan" is that it doesn't care if 244 # there are extra characters trailing the number (eg. "123a"). 245 # The extra %s substitution is used to detect this case. 246 if { [scan $nv "%g%s" dummy1 dummy2] != 1 } { 247 error "bad value \"$nv\": should be a real number" 248 } 249 } 250 } 251 252 if {"" != $itk_option(-minvalue)} { 253 set convMinVal [set minv $itk_option(-minvalue)] 254 if {"" != $units} { 255 set minv [Rappture::Units::convert $minv \ 256 -context $units -to $units -units off] 257 set convMinVal [Rappture::Units::convert \ 258 $itk_option(-minvalue) -context $units -to $nvUnits] 259 } else { 260 set newval [format "%g" $newval] 261 } 262 263 # fix for the case when the user tries to 264 # compare values like minv=-500 nv=-0600 265 set nv [format "%g" $nv] 266 set minv [format "%g" $minv] 267 268 if {$nv < $minv} { 269 error "minimum value allowed here is $convMinVal" 270 } 271 } 272 273 if {"" != $itk_option(-maxvalue)} { 274 set convMaxVal [set maxv $itk_option(-maxvalue)] 275 if {"" != $units} { 276 set maxv [Rappture::Units::convert $maxv \ 277 -context $units -to $units -units off] 278 set convMaxVal [Rappture::Units::convert \ 279 $itk_option(-maxvalue) -context $units -to $nvUnits] 280 } else { 281 set newval [format "%g" $newval] 282 } 283 284 # fix for the case when the user tries to 285 # compare values like maxv=500 nv=0600 286 set nv [format "%g" $nv] 287 set maxv [format "%g" $maxv] 288 289 if {$nv > $maxv} { 290 error "maximum value allowed here is $convMaxVal" 291 } 292 } 293 294 # 295 # If there's a -validatecommand option, then invoke the code 296 # now to check the new value. 297 # 298 if {[string length $itk_option(-validatecommand)] > 0} { 299 set cmd "uplevel #0 [list $itk_option(-validatecommand) [list $newval]]" 300 set result [eval $cmd] 301 } 302 303 if {$onlycheck} { 304 return 305 } 306 307 set _value $newval 308 309 _redraw 310 event generate $itk_component(hull) <<Value>> 311 312 } elseif {[llength $args] != 0} { 241 } else { 242 set onlycheck 0 243 } 244 245 if {[llength $args] != 1} { 313 246 error "wrong # args: should be \"value ?-check? ?newval?\"" 247 } 248 249 set newval [Rappture::Units::mcheck_range [lindex $args 0] \ 250 $itk_option(-minvalue) $itk_option(-maxvalue) $itk_option(-units)] 251 252 set newmode [lindex $newval 0] 253 switch -- $newmode { 254 uniform - 255 gaussian { 256 set _mode $newmode 257 } 258 exact - 259 default { 260 set _mode exact 261 } 262 } 263 264 switch -- $itk_option(-type) { 265 integer { 266 if { [scan $newval "%g" value] != 1 || int($newval) != $value } { 267 error "bad value \"$newval\": should be an integer value" 268 } 269 } 270 } 271 272 # 273 # If there's a -validatecommand option, then invoke the code 274 # now to check the new value. 275 # 276 if {[string length $itk_option(-validatecommand)] > 0} { 277 set cmd "uplevel #0 [list $itk_option(-validatecommand) [list $newval]]" 278 set result [eval $cmd] 279 } 280 281 if {$onlycheck} { 282 return 283 } 284 285 set _value $newval 286 $itk_component(value) configure -width [string length $_value] 287 _redraw 288 event generate $itk_component(hull) <<Value>> 289 290 if {"" != $_pde} { 291 set val [$_val translate [$_val value]] 292 $_val value $_mode 293 $_pde value $_value 294 314 295 } 315 296 return $_value … … 494 475 # ---------------------------------------------------------------------- 495 476 itcl::body Rappture::Gauge::_editor {option args} { 477 # puts "Gauge::editor option=$option args=$args" 496 478 if {$itk_option(-state) == "disabled"} { 497 479 return ;# disabled? then bail out here! … … 515 497 } 516 498 set val [lindex $args 0] 517 518 499 if {[catch {value -check $val} result]} { 519 500 if {[regexp {allowed here is (.+)} $result match newval]} { … … 597 578 } 598 579 580 if {$itk_option(-type) != "integer" && $uq} { 581 pack $itk_component(uq) -side right -padx 10 582 } 583 599 584 array set side2anchor { 600 585 left e … … 744 729 } 745 730 } 731 732 itcl::body Rappture::Gauge::_pop_uq {win} { 733 # puts "min=$itk_option(-minvalue) max=$itk_option(-maxvalue) units=$itk_option(-units)" 734 set varname $itk_option(-varname) 735 set popup .pop_uq_$varname 736 if { ![winfo exists $popup] } { 737 Rappture::Balloon $popup -title $itk_option(-label) 738 set inner [$popup component inner] 739 frame $inner.type 740 pack $inner.type -side top -fill x 741 label $inner.type.l -text "Parameter Value:" 742 pack $inner.type.l -side left 743 744 set _val [Rappture::Combobox $inner.type.val -width 20 -editable no] 745 pack $_val -side left -expand yes -fill x 746 $_val choices insert end exact "Exact Value" 747 $_val choices insert end uniform "Uniform Distribution" 748 $_val choices insert end gaussian "Gaussian Distribution" 749 bind $_val <<Value>> [itcl::code $this _change_param_type $inner] 750 751 set _pde [Rappture::ProbDistEditor $inner.entry \ 752 $itk_option(-minvalue) $itk_option(-maxvalue) $itk_option(-units) $_value] 753 $_val value $_mode 754 $_pde value $_value 755 pack $inner.entry -expand yes -fill both -pady {10 0} 756 757 $popup configure \ 758 -deactivatecommand [itcl::code $this _pop_uq_deactivate] 759 } 760 update 761 $popup activate $win right 762 } 763 764 itcl::body Rappture::Gauge::_pop_uq_deactivate {} { 765 # puts "deactivate [$_pde value]" 766 value [$_pde value] 767 } 768 769 itcl::body Rappture::Gauge::_change_param_type {inner} { 770 set val [$_val translate [$_val value]] 771 $_pde mode $val 772 } -
trunk/gui/scripts/main.tcl
r5659 r6021 97 97 } 98 98 99 proc ReadToolParameters { numTries } { 100 incr numTries -1 101 if { $numTries < 0 } { 102 return 103 } 104 global env 105 set paramsFile $env(TOOL_PARAMETERS) 106 if { ![file readable $paramsFile] } { 107 after 500 ReadToolParmeters $numTries 108 return 109 } 110 catch { 111 set f [open $paramsFile "r"] 112 set contents [read $f] 113 close $f 114 set pattern {^file\((.*)\):(.*)$} 115 foreach line [split $contents "\n"] { 116 if { [regexp $pattern $line match path rest] } { 117 set ::Rappture::parameters($path) $rest 118 } 119 } 120 } 121 } 122 123 if { [info exists env(TOOL_PARAMETERS)] } { 124 ReadToolParameters 10 125 } 126 99 127 set loadobjs {} 100 128 foreach runfile $params(-load) { … … 163 191 set installdir [file normalize [file dirname $params(-tool)]] 164 192 $xmlobj put tool.version.application.directory(tool) $installdir 165 166 193 set tool [Rappture::Tool ::#auto $xmlobj $installdir] 167 194 -
trunk/gui/scripts/numberentry.tcl
r5659 r6021 25 25 public method label {} 26 26 public method tooltip {} 27 28 27 protected method _newValue {} 29 28 … … 43 42 # ---------------------------------------------------------------------- 44 43 itcl::body Rappture::NumberEntry::constructor {owner path args} { 44 set varname [lindex [split $path ()] end-1] 45 45 if {[catch {$owner isa Rappture::ControlOwner} valid] != 0 || !$valid} { 46 46 error "bad object \"$owner\": should be Rappture::ControlOwner" … … 68 68 } 69 69 70 # check for number UQ flag 71 set use_uq [$_owner xml get $path.uq] 72 if {$use_uq == ""} { 73 # check for global UQ flag 74 set use_uq [[$_owner tool] xml get tool.uq] 75 } 76 77 if {$use_uq == ""} { 78 set use_uq no 79 } else { 80 set use_uq [string trim $use_uq] 81 } 82 70 83 # 71 84 # Create the widget and configure it properly based on other … … 73 86 # 74 87 itk_component add gauge { 75 $class $itk_interior.gauge -units $units -presets $presets -log $path 88 $class $itk_interior.gauge -uq $use_uq -units $units -presets $presets \ 89 -log $path -varname $varname -label [label] 76 90 } 77 91 pack $itk_component(gauge) -expand yes -fill both -
trunk/gui/scripts/probdisteditor.tcl
r5120 r6021 50 50 # CONSTRUCTOR 51 51 # ---------------------------------------------------------------------- 52 itcl::body Rappture::ProbDistEditor::constructor {min max } {52 itcl::body Rappture::ProbDistEditor::constructor {min max units default} { 53 53 # create a dispatcher for events 54 puts "PDE::constructor $min $max"54 #puts "PDE::constructor $min $max $default" 55 55 56 56 # These are the tool min and max values. May be empty. 57 57 set _umin $min 58 58 set _umax $max 59 set _units [Rappture::Units::Search::for $_umin] 59 set _units $units 60 set _uvalue(central) $default 60 61 61 62 Rappture::dispatcher _dispatcher … … 199 200 # ---------------------------------------------------------------------- 200 201 itcl::body Rappture::ProbDistEditor::value {{newval ""}} { 201 puts "PDE::value $newval"202 # puts "PDE::value $newval" 202 203 203 204 #FIXME: _value has numerical values _uvalue has value with units … … 243 244 if {"" != $_umin} { 244 245 if {"" != $units} { 245 set tmp(min) [Rappture::Units::convert $_umin -to $units - units off]246 set tmp(min) [Rappture::Units::convert $_umin -to $units -context $units -units off] 246 247 } else { 247 248 set tmp(min) $_umin … … 250 251 if {"" != $_umax} { 251 252 if {"" != $units} { 252 set tmp(max) [Rappture::Units::convert $_umax -to $units - units off]253 set tmp(max) [Rappture::Units::convert $_umax -to $units -context $units -units off] 253 254 } else { 254 255 set tmp(max) $_umax … … 285 286 # ---------------------------------------------------------------------- 286 287 itcl::body Rappture::ProbDistEditor::mode {{newval ""}} { 287 puts "PDE::mode mode=$newval min=$_umin max=$_umax units=$_units"288 # puts "PDE::mode mode=$newval min=$_umin max=$_umax units=$_units" 288 289 289 290 set modes {exact uniform gaussian custom} … … 291 292 return $modes 292 293 } 294 295 set check 0 296 if {$newval == "check"} { 297 set newval $_mode 298 set check 1 299 } 300 293 301 if {[lsearch $modes $newval] < 0} { 294 302 error "bad value \"$newval\": should be [join $modes {, }]" … … 303 311 set min "" 304 312 } else { 305 set min [Rappture::Units::convert $_umin - units off]313 set min [Rappture::Units::convert $_umin -context $_units -units off] 306 314 } 307 315 if {$_umax == ""} { 308 316 set max "" 309 317 } else { 310 set max [Rappture::Units::convert $_umax - units off]318 set max [Rappture::Units::convert $_umax -context $_units -units off] 311 319 } 312 320 } … … 326 334 uniform { 327 335 if {![info exists _value(min)] || ![info exists _value(max)]} { 328 # puts "UNIFORM min=$min max=$max" 329 if {$min != "" && $max != ""} { 330 set _value(min) $min 331 set _value(max) $max 332 } elseif {$min != ""} { 333 set _value(min) $min 334 set _value(max) [expr $min + 1] 335 } elseif {$max != ""} { 336 set _value(max) $max 337 set _value(min) [expr $max - 1] 336 set _value(max) [expr $_value(central) * 1.1] 337 set _value(min) [expr $_value(central) * 0.9] 338 if {$_value(central) == 0.0} { 339 set _value(max) 1.0 340 } 341 if {$min != ""} { 342 if {$_value(min) < $min} { 343 set $_value(min) $min 344 } 345 } 346 if {$max != ""} { 347 if {$_value(max) > $max} { 348 set $_value(max) $max 349 } 338 350 } 339 351 set _uvalue(min) $_value(min)$_units … … 342 354 } 343 355 gaussian { 344 # 356 #puts "GAUSSIAN min=$min max=$max" 345 357 if {![info exists _value(central)]} { 346 358 if {[info exists _value(min)] && [info exists _value(max)]} { … … 350 362 } 351 363 } 352 # 364 #puts "central=$_value(central)" 353 365 if {![info exists _value(stddev)]} { 354 if {[info exists _value(min)] && [info exists _value(max)]} { 355 set _value(stddev) [expr {0.3*($_value(max) - $_value(min))}] 356 } elseif {$min != "" && $max != ""} { 357 set _value(stddev) [expr {0.3*($max - $min)}] 358 } else { 359 set _value(stddev) [expr $_value(central) * 0.10] 360 } 366 set _value(stddev) [expr $_value(central) * 0.10] 361 367 } 362 368 if {$_value(stddev) <= 0} { 363 369 set _value(stddev) 1.0 364 370 } 365 # 371 #puts "stddev=$_value(stddev)" 366 372 # lower bound is -3 deviations or tool min 367 373 set trunc [expr {$_value(central) - 3*$_value(stddev)}] … … 387 393 } 388 394 395 if {$check == 1} { 396 return 397 } 389 398 # pop up the panel of editing options for this mode 390 399 foreach w [pack slaves $itk_component(vals)] { … … 452 461 # ---------------------------------------------------------------------- 453 462 itcl::body Rappture::ProbDistEditor::_redraw {} { 463 #puts "PDE::_redraw" 464 454 465 set g $itk_component(graph) 455 466 eval $g element delete [$g element names] … … 486 497 } 487 498 gaussian { 499 #puts "min=$_value(min) max=$_value(max)" 500 #puts "mean=$_value(central) dev=$_value(stddev)" 501 488 502 set min $_value(min) 489 503 set max $_value(max) … … 592 606 # ---------------------------------------------------------------------- 593 607 itcl::body Rappture::ProbDistEditor::_apply {op {widget ""}} { 594 puts "_apply $op $widget"608 #puts "PDE::_apply $op $widget" 595 609 if {$op != "bindings"} { 596 610 # need this for value/finalize … … 640 654 set newval [Rappture::Units::convert [$widget get] -context $_units] 641 655 } 642 puts "widget=$widget"643 656 set itk $itk_component(gaussianvals).stddev 644 puts "itk=$itk"645 657 if {$widget != $itk && [catch {Rappture::Units::mcheck_range $newval $_umin $_umax $_units} err]} { 646 658 # oops! value is bad -- edit again … … 658 670 set $uvar $newval 659 671 672 #if {$widget == $itk_component(gaussianvals).mean} { 673 # need new min and max 674 #set $_uvalue(min) 675 #set $_uvalue(max) ... 676 #} 677 660 678 if {[catch {Rappture::Units::convert $newval -units off} nvar]} { 661 679 set nvar $newval … … 663 681 set $var $nvar 664 682 683 mode check 665 684 $_dispatcher event -idle !redraw 666 685 } -
trunk/gui/scripts/responseviewer.tcl
r5849 r6021 167 167 168 168 if {$var1 == $var2} { 169 set path "output.curve(scatter)" 170 set _dobj [Rappture::Curve ::#auto $xmlobj $path] 171 Rappture::XyResult $w 172 $w add $_dobj {-color red} 173 169 174 set path "output.curve(response)" 170 175 set _dobj [Rappture::Curve ::#auto $xmlobj $path] 171 Rappture::XyResult $w 176 172 177 } else { 173 178 set path "output.field(f2d)" -
trunk/gui/scripts/resultviewer.tcl
r5659 r6021 26 26 27 27 constructor {args} { 28 28 # defined below 29 29 } 30 30 destructor { 31 31 # defined below 32 32 } 33 public method add {index xmlobj path }33 public method add {index xmlobj path label {uq_part ""}} 34 34 public method clear {{index ""}} 35 35 public method value {xmlobj} … … 40 40 protected method _plotAdd {xmlobj {settings ""}} 41 41 protected method _fixScale {args} 42 protected method _xml2data {xmlobj path }42 protected method _xml2data {xmlobj path label {uq_part ""}} 43 43 protected method _cleanIndex {index} 44 44 … … 58 58 # ---------------------------------------------------------------------- 59 59 itcl::body Rappture::ResultViewer::constructor {args} { 60 #puts "Creating RV $args" 60 61 # create a dispatcher for events 61 62 Rappture::dispatcher _dispatcher … … 84 85 # Data is taken from the <xmlobj> object at the <path>. 85 86 # ---------------------------------------------------------------------- 86 itcl::body Rappture::ResultViewer::add {index xmlobj path} { 87 itcl::body Rappture::ResultViewer::add {index xmlobj path label {uq_part ""}} { 88 #puts "RV add index=$index path=$path label=$label uq_part=$uq_part" 87 89 set index [_cleanIndex $index] 88 set dobj [_xml2data $xmlobj $path ]90 set dobj [_xml2data $xmlobj $path $label $uq_part] 89 91 90 92 # … … 95 97 lappend _dataslots "" 96 98 } 99 97 100 set slot [lindex $_dataslots $index] 98 lappend slot $dobj 99 set _dataslots [lreplace $_dataslots $index $index $slot] 100 101 $_dispatcher event -idle !scale 101 102 # only add dobj if it isn't already there. 103 if {[lsearch -exact $slot $dobj] < 0} { 104 lappend slot $dobj 105 #puts "slot=$slot" 106 set _dataslots [lreplace $_dataslots $index $index $slot] 107 $_dispatcher event -idle !scale 108 } 102 109 } 103 110 … … 112 119 # ---------------------------------------------------------------------- 113 120 itcl::body Rappture::ResultViewer::clear {{index ""}} { 121 #puts "RV::clear $index" 114 122 if {$index ne ""} { 115 123 # clear one result … … 191 199 # ---------------------------------------------------------------------- 192 200 itcl::body Rappture::ResultViewer::plot {option args} { 201 #puts "RV plot option=$option args=$args" 193 202 switch -- $option { 194 203 add { … … 250 259 # ---------------------------------------------------------------------- 251 260 itcl::body Rappture::ResultViewer::_plotAdd {dataobj {settings ""}} { 261 #puts "RV _plotAdd $dataobj : [$dataobj info class] : $settings" 252 262 switch -- [$dataobj info class] { 263 ::Rappture::UqInfo { 264 set mode "uq" 265 if {![info exists _mode2widget($mode)]} { 266 set w $itk_interior.uq 267 Rappture::UqNotebook $w 268 set _mode2widget($mode) $w 269 } 270 } 253 271 ::Rappture::DataTable { 254 272 set mode "datatable" … … 411 429 } 412 430 413 if {$mode != $_mode && $_mode != ""} {414 set nactive [llength [$_mode2widget($_mode) get]]415 if {$nactive > 0} {416 return ;# mixing data that doesn't mix -- ignore it!417 }418 }419 431 # Are we plotting in a new mode? then change widgets 420 432 if {$_mode2widget($mode) != [pack slaves $itk_interior]} { … … 442 454 if {"" != $_mode} { 443 455 set dlist "" 456 set objclass "" 444 457 foreach slot $_dataslots { 445 458 foreach dobj $slot { 459 if {$objclass == ""} { 460 set objclass [$dobj info class] 461 } else { 462 if {$objclass != [$dobj info class]} { 463 # If some of the objects are different classes 464 # then we cannot use the same scale, so give up. 465 return 466 } 467 } 446 468 lappend dlist $dobj 447 469 } … … 474 496 # specified <path> in the <xmlobj>. 475 497 # ---------------------------------------------------------------------- 476 itcl::body Rappture::ResultViewer::_xml2data {xmlobj path} { 477 if {[info exists _xml2data($xmlobj-$path)]} { 498 itcl::body Rappture::ResultViewer::_xml2data {xmlobj path label {uq_part ""}} { 499 #puts "RV:_xml2data $path ([$xmlobj element -as type $path]) label=$label uq_part=$uq_part" 500 501 if {$uq_part != ""} { 502 if {[info exists _xml2data($xmlobj-$label)]} { 503 $_xml2data($xmlobj-$label) add $xmlobj $path $uq_part 504 return $_xml2data($xmlobj-$label) 505 } 506 } elseif {[info exists _xml2data($xmlobj-$path]} { 478 507 return $_xml2data($xmlobj-$path) 479 508 } 480 509 481 set type [$xmlobj element -as type $path] 510 if {$uq_part != ""} { 511 set type "UQ" 512 } else { 513 set type [$xmlobj element -as type $path] 514 } 515 482 516 switch -- $type { 517 UQ { 518 set dobj [Rappture::UqInfo ::#auto $xmlobj $path $uq_part] 519 set path $label 520 } 483 521 curve { 484 522 set dobj [Rappture::Curve ::#auto $xmlobj $path] -
trunk/gui/scripts/spectrum.tcl
r5659 r6021 199 199 200 200 set value [lindex $args 0] 201 if {$units != ""} { 202 set value [Rappture::Units::convert $value \ 203 -context $units -to $units -units off] 201 202 switch -- [lindex $value 0] { 203 gaussian { 204 set value [lindex $value 1] 205 if {$units != ""} { 206 set value [Rappture::Units::convert $value \ 207 -context $units -to $units -units off] 208 } 209 } 210 uniform { 211 set min [lindex $value 1] 212 set max [lindex $value 2] 213 if {$units != ""} { 214 set min [Rappture::Units::convert $min \ 215 -context $units -to $units -units off] 216 set max [Rappture::Units::convert $max \ 217 -context $units -to $units -units off] 218 } 219 set value [expr {0.5 * ($min + $max)}] 220 } 221 default { 222 if {$units != ""} { 223 set value [Rappture::Units::convert $value \ 224 -context $units -to $units -units off] 225 } 226 } 204 227 } 205 228 -
trunk/gui/scripts/tempgauge.tcl
r5659 r6021 26 26 inherit Rappture::Gauge 27 27 28 constructor {args} { # defined below } 29 28 constructor {args} { 29 array set attrs $args 30 Rappture::Gauge::constructor -uq $attrs(-uq) 31 } { 32 eval itk_initialize -spectrum $_spectrum -units K $args 33 } 30 34 protected method _redraw {} 31 35 protected method _resize {} … … 40 44 41 45 itk::usual TemperatureGauge { 42 }43 44 # ----------------------------------------------------------------------45 # CONSTRUCTOR46 # ----------------------------------------------------------------------47 itcl::body Rappture::TemperatureGauge::constructor {args} {48 eval itk_initialize -spectrum $_spectrum -units K $args49 46 } 50 47 -
trunk/gui/scripts/tool.tcl
r5659 r6021 28 28 public method installdir {} { 29 29 return [$_task installdir] 30 } 31 public method get_uq {args} { 32 sync ;# sync all widget values to XML 33 return [eval $_task get_uq $args] 30 34 } 31 35 public method run {args} { -
trunk/gui/scripts/units.tcl
r5659 r6021 61 61 } 62 62 63 64 # ---------------------------------------------------------------------- 65 # USAGE: mcheck_range value {min ""} {max ""} 66 # 67 # Checks a value or PDF to determine if is is in a required range. 68 # Automatically does unit conversion if necessary. 69 # Returns value if OK. Error if out-of-range 70 # Examples: 71 # [mcheck_range "gaussian 0C 1C" 200K 500K] returns 1 72 # [mcheck_range "uniform 100 200" 150 250] returns 0 73 # [mcheck_range 100 0 200] returns 1 74 # ---------------------------------------------------------------------- 75 76 proc Rappture::Units::_check_range {value min max units} { 77 # puts "_check_range $value min=$min max=$max units=$units" 78 # make sure the value has units 79 if {$units != ""} { 80 set value [Rappture::Units::convert $value -context $units] 81 # for comparisons, remove units 82 set nv [Rappture::Units::convert $value -context $units -units off] 83 # get the units for the value 84 set newunits [Rappture::Units::Search::for $value] 85 } else { 86 set nv $value 87 } 88 89 if {"" != $min} { 90 if {"" != $units} { 91 # compute the minimum in the new units 92 set minv [Rappture::Units::convert $min -to $newunits -context $units -units off] 93 # same, but include units for printing 94 set convMinVal [Rappture::Units::convert $min -to $newunits -context $units] 95 } else { 96 set minv $min 97 set convMinVal $min 98 } 99 if {$nv < $minv} { 100 error "Minimum value allowed here is $convMinVal" 101 } 102 } 103 if {"" != $max} { 104 if {"" != $units} { 105 # compute the maximum in the new units 106 set maxv [Rappture::Units::convert $max -to $newunits -context $units -units off] 107 # same, but include units for printing 108 set convMaxVal [Rappture::Units::convert $max -to $newunits -context $units ] 109 } else { 110 set maxv $max 111 set convMaxVal $max 112 } 113 if {$nv > $maxv} { 114 error "Maximum value allowed here is $convMaxVal" 115 } 116 } 117 return $value 118 } 119 120 proc Rappture::Units::mcheck_range {value {min ""} {max ""} {units ""}} { 121 # puts "mcheck_range $value min=$min max=$max units=$units" 122 123 switch -- [lindex $value 0] { 124 normal - 125 gaussian { 126 # get the mean 127 set mean [_check_range [lindex $value 1] $min $max $units] 128 if {$units == ""} { 129 set dev [lindex $value 2] 130 set ndev $dev 131 } else { 132 set dev [Rappture::Units::convert [lindex $value 2] -context $units] 133 set ndev [Rappture::Units::convert $dev -units off] 134 } 135 if {$ndev <= 0} { 136 error "Deviation must be positive." 137 } 138 return [list gaussian $mean $dev] 139 } 140 uniform { 141 set min [_check_range [lindex $value 1] $min $max $units] 142 set max [_check_range [lindex $value 2] $min $max $units] 143 return [list uniform $min $max] 144 } 145 exact { 146 return [_check_range [lindex $value 1] $min $max $units] 147 } 148 default { 149 return [_check_range [lindex $value 0] $min $max $units] 150 } 151 } 152 } 153 154 # ---------------------------------------------------------------------- 155 # USAGE: mconvert value ?-context units? ?-to units? ?-units on/off? 156 # 157 # This version of convert() converts multiple values. Used when the 158 # value could be a range or probability density function (PDF). 159 # Examples: 160 # gaussian 100k 1k 161 # uniform 0eV 10eV 162 # 42 163 # exact 42 164 # ---------------------------------------------------------------------- 165 166 proc Rappture::Units::mconvert {value args} { 167 # puts "mconvert $value : $args" 168 array set opts { 169 -context "" 170 -to "" 171 -units "on" 172 } 173 174 set value [split $value] 175 176 switch -- [lindex $value 0] { 177 normal - gaussian { 178 set valtype gaussian 179 set vals [lrange $value 1 2] 180 set convtype {0 1} 181 } 182 uniform { 183 set valtype uniform 184 set vals [lrange $value 1 2] 185 set convtype {0 0} 186 } 187 exact { 188 set valtype "" 189 set vals [lindex $value 1] 190 set convtype {0} 191 } 192 default { 193 set valtype "" 194 set vals $value 195 set convtype {0} 196 } 197 } 198 199 foreach {key val} $args { 200 if {![info exists opts($key)]} { 201 error "bad option \"$key\": should be [join [lsort [array names opts]] {, }]" 202 } 203 set opts($key) $val 204 } 205 206 set newval $valtype 207 foreach val $vals ctype $convtype { 208 if {$ctype == 1} { 209 # This code handles unit conversion for deltas (changes). 210 # For example, if we want a standard deviation of 10C converted 211 # to Kelvin, that is 10K, NOT a standard deviation of 283.15K. 212 set units [Rappture::Units::Search::for $val] 213 set base [eval Rappture::Units::convert 0$units $args -units off] 214 set new [eval Rappture::Units::convert $val $args -units off] 215 set delta [expr $new - $base] 216 set val $delta$opts(-to) 217 } 218 # tcl 8.5 allows us to do this: 219 # lappend newval [Rappture::Units::convert $val {*}$args] 220 # but we are using tcl8.4 so we use eval :^( 221 lappend newval [eval Rappture::Units::convert $val $args] 222 } 223 return $newval 224 } 225 63 226 # ---------------------------------------------------------------------- 64 227 # USAGE: convert value ?-context units? ?-to units? ?-units on/off? … … 70 233 # current system. 71 234 # ---------------------------------------------------------------------- 72 proc Rappture::Units::convert {value args} { 73 array set opts { 74 -context "" 75 -to "" 76 -units "on" 77 } 78 foreach {key val} $args { 79 if {![info exists opts($key)]} { 80 error "bad option \"$key\": should be [join [lsort [array names opts]] {, }]" 81 } 82 set opts($key) $val 83 } 84 85 # 86 # Parse the value into the number part and the units part. 87 # 88 set value [string trim $value] 89 if {![regexp {^([-+]?[0-9]+\.?([0-9]+)?([eEdD][-+]?[0-9]+)?) *(/?[a-zA-Z]+[0-9]*)?$} $value match number dummy1 dummy2 units]} { 90 set mesg "bad value \"$value\": should be real number with units" 91 if {$opts(-context) != ""} { 92 append mesg " of [Rappture::Units::description $opts(-context)]" 93 } 94 error $mesg 95 } 96 if {$units == ""} { 97 set units $opts(-context) 98 } 99 100 # 101 # Try to find the object representing the current system of units. 102 # 103 set units [Rappture::Units::System::regularize $units] 104 set oldsys [Rappture::Units::System::for $units] 105 if {$oldsys == ""} { 106 set mesg "value \"$value\" has unrecognized units" 107 if {$opts(-context) != ""} { 108 append mesg ".\nShould be units of [Rappture::Units::description $opts(-context)]" 109 } 110 error $mesg 111 } 112 113 # 114 # Convert the number to the new system of units. 115 # 116 if {$opts(-to) == ""} { 117 # no units -- return the number as is 118 return "$number$units" 119 } 120 return [$oldsys convert "$number$units" $opts(-to) $opts(-units)] 121 } 235 # proc Rappture::Units::convert {value args} {} 236 # Actual implementation is in rappture/lang/tcl/src/RpUnitsTclInterface.cc. 237 122 238 123 239 # ---------------------------------------------------------------------- … … 128 244 # along with a list of all compatible systems. 129 245 # ---------------------------------------------------------------------- 130 proc Rappture::Units::description {units} { 131 set sys [Rappture::Units::System::for $units] 132 if {$sys == ""} { 133 return "" 134 } 135 set mesg [$sys cget -type] 136 set ulist [Rappture::Units::System::all $units] 137 if {"" != $ulist} { 138 append mesg " ([join $ulist {, }])" 139 } 140 return $mesg 141 } 246 # proc Rappture::Units::description {units} {} 247 # Actual implementation is in rappture/lang/tcl/src/RpUnitsTclInterface.cc. 248 142 249 143 250 # ---------------------------------------------------------------------- … … 154 261 private variable _system "" ;# this system of units 155 262 156 public proc for {units} 157 public proc all {units} 263 # These are in rappture/lang/tcl/src/RpUnitsTclInterface.cc. 264 # public proc for {units} 265 # public proc all {units} 266 158 267 public proc regularize {units} 159 268 … … 361 470 # if there is no system that matches the units string. 362 471 # ---------------------------------------------------------------------- 363 itcl::body Rappture::Units::System::for {units} { 364 # 365 # See if the units are a recognized system. If not, then try to 366 # extract any metric prefix and see if what's left is a recognized 367 # system. If all else fails, see if we can find a system without 368 # the exact capitalization. The user might say "25c" instead of 369 # "25C". Try to allow that. 370 # 371 if {[info exists _base($units)]} { 372 return $_base($units) 373 } else { 374 set orig $units 375 if {[regexp {^(/?)[cCmMuUnNpPfFaAkKgGtT](.+)$} $units match slash tail]} { 376 set base "$slash$tail" 377 if {[info exists _base($base)]} { 378 set sys $_base($base) 379 if {[$sys cget -metric]} { 380 return $sys 381 } 382 } 383 384 # check the base part for improper capitalization below... 385 set units $base 386 } 387 388 set matching "" 389 foreach u [array names _base] { 390 if {[string equal -nocase $u $units]} { 391 lappend matching $_base($u) 392 } 393 } 394 if {[llength $matching] == 1} { 395 set sys [lindex $matching 0] 396 # 397 # If we got rid of a metric prefix above, make sure 398 # that the system is metric. If not, then we don't 399 # have a match. 400 # 401 if {[string equal $units $orig] || [$sys cget -metric]} { 402 return $sys 403 } 404 } 405 } 406 return "" 407 } 472 # itcl::body Rappture::Units::System::for {units} {} 473 # Actual implementation is in rappture/lang/tcl/src/RpUnitsTclInterface.cc. 474 408 475 409 476 # ---------------------------------------------------------------------- … … 414 481 # relationships that lead to the same base system. 415 482 # ---------------------------------------------------------------------- 416 itcl::body Rappture::Units::System::all {units} { 417 set sys [Rappture::Units::System::for $units] 418 if {$sys == ""} { 419 return "" 420 } 421 422 if {"" != [$sys cget -basis]} { 423 set basis [lindex [$sys cget -basis] 0] 424 } else { 425 set basis $units 426 } 427 428 set ulist $basis 429 foreach u [array names _base] { 430 set obj $_base($u) 431 set b [lindex [$obj cget -basis] 0] 432 if {$b == $basis} { 433 lappend ulist $u 434 } 435 } 436 return $ulist 437 } 483 # itcl::body Rappture::Units::System::all {units} {} 484 # Actual implementation is in rappture/lang/tcl/src/RpUnitsTclInterface.cc. 485 438 486 439 487 # ---------------------------------------------------------------------- -
trunk/gui/scripts/uq.tcl
r5120 r6021 4 4 itcl::class Rappture::UQ { 5 5 6 constructor {varlist type uqargs} {7 puts "Rappture::UQ constructor $varlist:$type:$uqargs"6 constructor {varlist num type uqargs} { 7 #puts "Rappture::UQ constructor $varlist:$type:$uqargs" 8 8 set _varlist $varlist 9 9 set _type $type 10 10 set _args $uqargs 11 set _num $num 11 12 } 12 13 … … 30 31 private variable _num_pts {} 31 32 private variable _go "" 33 private variable _num 0 32 34 } 33 35 … … 64 66 label $fr.text 65 67 66 67 68 # bind $_val <<Value>> [itcl::code $this _change_param_type $inner] 68 69 69 70 button $fr.cancel -text Cancel -command [itcl::code $this _setWaitVariable 0] 70 71 set _go $fr.go 71 button $_go -text Continue-command [itcl::code $this _setWaitVariable 1]72 button $_go -text "Launch Jobs" -command [itcl::code $this _setWaitVariable 1] 72 73 _set_text $inner 73 74 … … 119 120 120 121 itcl::body Rappture::UQ::num_runs {} { 121 set numvars [llength $_varlist] 122 puts "UQ num_runs $numvars $_type $_args" 122 #puts "varlist=$_varlist" 123 set numvars $_num 124 #puts "UQ num_runs $numvars $_type $_args" 123 125 if {![array exists _num_pts]} { _init_num_pts_array } 124 126 switch $_type { -
trunk/gui/scripts/xyresult.tcl
r5659 r6021 249 249 } 250 250 if { $color == "auto" || $color == "autoreset" } { 251 #if { $color == "autoreset" } {252 #set _nextColorIndex 0253 #}251 if { $color == "autoreset" } { 252 set _nextColorIndex 0 253 } 254 254 set color [lindex $itk_option(-autocolors) $_nextColorIndex] 255 255 if { "" == $color} {
Note: See TracChangeset
for help on using the changeset viewer.