Changeset 1967 for trunk/tester


Ignore:
Timestamp:
Nov 26, 2010 3:36:25 PM (9 years ago)
Author:
braffert
Message:

Developing regression tester

Location:
trunk/tester
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tester/mainwin.tcl

    r1966 r1967  
    2525    public method runAll {args}
    2626    public method runSelected {args}
    27     public method selectionHandler {}
     27
     28    private method selectionHandler {}
    2829    private method runTest {id args}
    2930
     
    5051
    5152    itk_component add pw {
    52         panedwindow $itk_interior.pw
     53        panedwindow $itk_interior.pw 
    5354    } {
    5455    }
     
    5758    itk_component add tree {
    5859        Rappture::Regression::TestTree $itk_component(pw).tree \
    59             -command "$this runSelected" -testdir $_testdir \
    60             -selectcommand "$this selectionHandler"
     60            -command "[itcl::code $itk_interior runSelected]" \
     61            -testdir $_testdir \
     62            -selectcommand "[itcl::code $itk_interior selectionHandler]"
    6163    }
    62     $itk_component(pw) add $itk_component(tree) -sticky nsew
     64    $itk_component(pw) add $itk_component(tree)
    6365
    6466    itk_component add view {
    6567        Rappture::Regression::TestView $itk_component(pw).view
    6668    }
    67     $itk_component(pw) add $itk_component(view) -sticky nsew
    68 
    69     # TODO: make panes scale proportionally when window grows
     69    $itk_component(pw) add $itk_component(view)
    7070
    7171    eval itk_initialize $args
  • trunk/tester/testtree.tcl

    r1966 r1967  
    3434    public method getData {id}
    3535    public method setData {id data}
    36     public method updateLabel {}
    37 
     36
     37    private method updateLabel {}
    3838    private method populate {}
    39 }
    40 
     39
     40}
     41 
    4142itk::usual TestTree {
    4243    keep -background -foreground -font
     
    4748# ----------------------------------------------------------------------
    4849itcl::body Rappture::Regression::TestTree::constructor {args} {
     50    itk_component add scrollbars {
     51        Rappture::Scroller $itk_interior.scroller \
     52            -xscrollmode auto -yscrollmode auto
     53    }
    4954    itk_component add treeview {
    50         blt::treeview $itk_interior.treeview -separator . -autocreate true \
    51             -selectmode multiple
     55        blt::treeview $itk_component(scrollbars).treeview -separator . \
     56            -autocreate true -selectmode multiple
    5257    } {
    5358    }
    54     $itk_component(treeview) column insert 0 result
     59    $itk_component(treeview) column insert 0 result -width 75
    5560    $itk_component(treeview) column insert end testxml ran diffs
    5661    $itk_component(treeview) column configure testxml ran diffs -hide yes
    57     pack $itk_component(treeview) -expand yes -fill both
     62    $itk_component(scrollbars) contents $itk_component(treeview)
    5863
    5964    itk_component add bottomBar {
    6065        frame $itk_interior.bottomBar
    6166    }
    62     pack $itk_component(bottomBar) -fill x
    63     # TODO: Adjust spacing in bottom bar
     67    pack $itk_component(bottomBar) -fill x -side bottom
    6468
    6569    itk_component add bSelectAll {
     
    7478    }
    7579    pack $itk_component(bSelectNone) -side left
    76 
    77     itk_component add lSelected {
    78         label $itk_component(bottomBar).lSelected -text "0 tests selected"
    79     }
    80     pack $itk_component(lSelected) -side left -expand yes -fill x
    8180
    8281    itk_component add bRun {
     
    8584        keep -command
    8685    }
    87     pack $itk_component(bRun) -side left
     86    pack $itk_component(bRun) -side right
     87
     88    itk_component add lSelected {
     89        label $itk_component(bottomBar).lSelected -text "0 tests selected"
     90    }
     91    pack $itk_component(lSelected) -side right -padx 5
    8892
    8993    # TODO: Fix black empty space when columns are shrunk
    90     # TODO: Scrollbar(s)
     94
     95    pack $itk_component(scrollbars) -side left -expand yes -fill both
    9196
    9297    eval itk_initialize $args
     
    102107itcl::configbody Rappture::Regression::TestTree::selectcommand {
    103108    $itk_component(treeview) configure -selectcommand \
    104         "$this updateLabel; $selectcommand"
     109        "[itcl::code $itk_interior updateLabel]; $selectcommand"
    105110}
    106111
     
    126131                 [list testxml $testxml ran no result "" diffs ""] \
    127132                 -icons "$icon $icon" -activeicons "$icon $icon"
    128             }
    129133        }
     134    }
    130135    $itk_component(treeview) open -recurse root
     136    # TODO: Fix width of main treeview column
    131137}
    132138
Note: See TracChangeset for help on using the changeset viewer.