Changeset 2027 for trunk/tester
- Timestamp:
- Jan 12, 2011 2:51:29 PM (14 years ago)
- Location:
- trunk/tester
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tester/resultspage.tcl
r2026 r2027 18 18 itk_option define -textfont textFont Font "" 19 19 itk_option define -boldtextfont boldTextFont Font "" 20 itk_option define -clearcommand clearCommand ClearCommand "" 21 itk_option define -appname appName AppName "" 20 22 21 23 constructor {args} { # defined below } … … 25 27 public method clear {} 26 28 public method download {option args} 29 public method resultset {} 27 30 28 31 protected method _plot {args} … … 90 93 91 94 if {[Rappture::filexfer::enabled]} { 92 Rappture::Toolt op::for $itk_component(download) "Downloads the current result to a new web browser window on your desktop. From there, you can easily print or save results.95 Rappture::Tooltip::for $itk_component(download) "Downloads the current result to a new web browser window on your desktop. From there, you can easily print or save results. 93 96 94 97 NOTE: Your web browser must allow pop-ups from this site. If your output does not appear, look for a 'pop-up blocked' message and enable pop-ups." … … 114 117 -clearcommand [itcl::code $this clear] \ 115 118 -settingscommand [itcl::code $this _plot] 116 } {117 usual118 keep -promptcommand119 119 } 120 120 pack $itk_component(resultset) -expand yes -fill both … … 129 129 itcl::delete object $obj 130 130 } 131 # TODO: after cancel [itcl::code $this simulate] ???132 131 } 133 132 … … 228 227 set f [$itk_component(resultpages) page $page] 229 228 set item [$itk_component(resultselector) value] 230 set result [$f.rviewer download now $widget $_appName $item] 229 set result [$f.rviewer download now $widget \ 230 $itk_option(-appname) $item] 231 231 if { $result == "" } { 232 232 return; # User cancelled the download. … … 260 260 261 261 itcl::body Rappture::ResultsPage::load {xmlobj} { 262 # TODO: only show the last result? then clear first263 264 262 # look for all output.load children and load them first 265 263 # each run.xml is loaded as a previous simulation. … … 439 437 #set _pages 0 440 438 441 # TODO: _simState on 442 # TODO: _fixSimControl 443 # TODO: _reset 439 # Invoke -clearcommand option 440 if {[string length $itk_option(-clearcommand)] > 0} { 441 uplevel #0 $itk_option(-clearcommand) 442 } 443 444 444 } 445 445 … … 539 539 } 540 540 541 itcl::body Rappture::ResultsPage::resultset {} { 542 return $itk_component(resultset) 543 } 544 -
trunk/tester/tester.tcl
r2019 r2027 72 72 -selectcommand Rappture::Tester::selectionHandler] 73 73 .pw add [frame .right] 74 Rappture::Tester::TestView .right.view -toolxml $params(-tool)74 Rappture::Tester::TestView .right.view 75 75 button .right.regoldenize -text "Regoldenize" -state disabled \ 76 76 -command Rappture::Tester::regoldenize … … 78 78 pack .right.view -side bottom -expand yes -fill both 79 79 pack .pw -expand yes -fill both 80 set lastsel "" 80 81 81 82 # TODO: Handle resizing better … … 91 92 # ---------------------------------------------------------------------- 92 93 proc Rappture::Tester::selectionHandler {args} { 94 global lastsel 93 95 set test [.tree getTest] 94 .right.view configure -test $test 95 if {$test != "" && [$test hasRan] && [$test getResult] != "Error"} { 96 .right.regoldenize configure -state normal 97 } else { 98 .right.regoldenize configure -state disabled 96 if {$test != $lastsel} { 97 .right.view configure -test $test 98 if {$test != "" && [$test hasRan] && [$test getResult] != "Error"} { 99 .right.regoldenize configure -state normal 100 } else { 101 .right.regoldenize configure -state disabled 102 } 103 set lastsel $test 99 104 } 100 105 } -
trunk/tester/testview.tcl
r2026 r2027 4 4 # Entire right hand side of the regression tester. Displays the 5 5 # golden test results, and compares them to the new results if the test 6 # has been ran. The new version's tool.xml must be provided through the 7 # -toolxml configuration option, and the -test configuration option is 8 # used to provide a Test object to display. 6 # has been ran. The -test configuration option is used to provide a 7 # Test object to display. 9 8 # ====================================================================== 10 9 # AUTHOR: Ben Rafferty, Purdue University … … 32 31 33 32 public variable test 34 public variable toolxml 35 36 constructor {toolxml args} { #defined later } 33 34 constructor {args} { #defined later } 37 35 38 36 protected method reset … … 90 88 eval itk_initialize $args 91 89 92 if {$toolxml == "" } {93 error "no -toolxml configuration option given."94 }95 }96 97 # --------------------------------------------------------------------98 # Create a new Tool object if -toolxml option is changed. Also99 # refresh the display by calling the configbody for the -test option.100 # ----------------------------------------------------------------------101 itcl::configbody Rappture::Tester::TestView::toolxml {102 #set _tool [Rappture::Tool ::#auto [Rappture::library $toolxml] \103 # [file dirname $toolxml]]104 $this configure -test [$this cget -test]105 90 } 106 91
Note: See TracChangeset
for help on using the changeset viewer.