Tk Source Code

Check-in [2058b166]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add tests for the 'propagate off' case of pack and grid
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip518-event-last-child-unmanaged
Files: files | file ages | folders
SHA3-256: 2058b16671c189543b674bbf0b9737635bec2747ab6d93f5390433f4ebe9ee79
User & Date: fvogel 2018-10-30 22:55:31
Context
2018-11-06
14:40
Tidy up tests Closed-Leaf check-in: 03c7d3df user: dkf tags: tip518-event-last-child-unmanaged
2018-10-30
22:55
Add tests for the 'propagate off' case of pack and grid check-in: 2058b166 user: fvogel tags: tip518-event-last-child-unmanaged
22:07
Added tests checking that <<NoManagedChild>> fires on destruction of the last managed child check-in: 9ac3dfe7 user: fvogel tags: tip518-event-last-child-unmanaged
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/grid.test.

2096
2097
2098
2099
2100
2101
2102

2103
2104
2105
2106
2107
2108
2109
2110














2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    grid_reset 24.6
} -result {0}
test grid-24.7 {<<NoManagedChild>> does not fire on grid anchor} -body {
    global A

    bind . <<NoManagedChild>> {set A 1}
    grid anchor . w
    update
    info exists A
} -cleanup {
    grid anchor . nw
    bind . <<NoManagedChild>> {}
    grid_reset 24.7














} -result {0}

 
# cleanup
cleanupTests
return

# Local Variables:
# mode: tcl
# End:






>








>
>
>
>
>
>
>
>
>
>
>
>
>
>










2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    grid_reset 24.6
} -result {0}
test grid-24.7 {<<NoManagedChild>> does not fire on grid anchor} -body {
    global A
    catch {unset A}
    bind . <<NoManagedChild>> {set A 1}
    grid anchor . w
    update
    info exists A
} -cleanup {
    grid anchor . nw
    bind . <<NoManagedChild>> {}
    grid_reset 24.7
} -result {0}
test grid-24.8 {<<NoManagedChild>> does not fire on last grid forget if propagation is off} -body {
    global A
    catch {unset A}
    grid [frame .1]
    grid propagate . 0
    update
    bind . <<NoManagedChild>> {set A 1}
    grid forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    grid_reset 24.8
} -result {0}

 
# cleanup
cleanupTests
return

# Local Variables:
# mode: tcl
# End:

Changes to tests/pack.test.

1689
1690
1691
1692
1693
1694
1695














1696
1697
1698
1699
1700
1701
1702
1703
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    destroy .1 .2
} -result {1}
















# cleanup
cleanupTests
return









>
>
>
>
>
>
>
>
>
>
>
>
>
>








1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    destroy .1 .2
} -result {1}
test pack-20.6 {<<NoManagedChild>> does not fire on last pack forget if propagation is off} -body {
    global A
    catch {unset A}
    pack [frame .1]
    pack propagate . 0
    update
    bind . <<NoManagedChild>> {set A 1}
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    destroy .1
} -result {0}


# cleanup
cleanupTests
return