Tk Source Code

Check-in [eda5d55d]
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:Tests for virtual event <<NoManagedChild>>
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | tip518-event-last-child-unmanaged
Files: files | file ages | folders
SHA3-256: eda5d55d399f1a0b9698f8e4077eaacdacf5765caeb7b2e2ea6b30743fcdeb52
User & Date: oehhar 2018-10-29 12:52:40
Context
2018-10-29
23:01
Enhance the tests for <<NoManagedChild>>, and fix the implementation so that this event only fires when the last slave is forgotten/removed. check-in: 70839a22 user: fvogel tags: tip518-event-last-child-unmanaged
12:52
Tests for virtual event <<NoManagedChild>> check-in: eda5d55d user: oehhar tags: tip518-event-last-child-unmanaged
2018-10-28
22:17
Documentation check-in: 149ea1b1 user: dkf tags: tip518-event-last-child-unmanaged
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tests/grid.test.

2013
2014
2015
2016
2017
2018
2019
2020







































































2021
2022
2023
2024
2025
2026
2027
    pack .f
    update
    pack forget .f
    update
    winfo ismapped .t ; # must return 1
} {1}
grid_reset 23
 







































































# cleanup
cleanupTests
return

# Local Variables:
# mode: tcl
# End:






|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
    pack .f
    update
    pack forget .f
    update
    winfo ismapped .t ; # must return 1
} {1}
grid_reset 23

test grid-24.1 {<<NoManagedChild>> fires on last grid forget} -body {
    global A
    catch {unset A}
    grid [frame .1]
    update
    bind . <<NoManagedChild>> {set A 1}
    grid forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    grid_reset 14.1
} -result {1}

test grid-24.2 {<Configure> does not fire on last grid forget} -body {
    global A
    catch {unset A}
    grid [frame .1]
    update
    bind . <Configure> {set A 1}
    grid forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    grid_reset 14.2
} -result {0}

test grid-24.3 {<Configure> fires on forelast grid forget} -body {
    global A
    catch {unset A}
    grid [frame .1]
    grid [frame .2]
    update
    bind . <Configure> {set A 1}
    grid forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    grid_reset 14.3
} -result {1}

test grid-24.4 {<<NoManagedChild>> does not fire on forelast grid forget} -body {
    global A
    catch {unset A}
    grid [frame .1]
    grid [frame .2]
    update
    bind . <<NoManagedChild>> {set A 1}
    grid forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    grid_reset 14.4
} -result {0}

test grid-24.5 {<<NoManagedChild>> should 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 14.5
} -result {0}

 
# cleanup
cleanupTests
return

# Local Variables:
# mode: tcl
# End:

Changes to tests/pack.test.

1621
1622
1623
1624
1625
1626
1627


























































1628
1629
1630
1631
1632
1633
1634
1635
    set res [list [winfo geometry .pack.lf]]
    .pack.lf configure -labelanchor ws
    update
    lappend res [winfo geometry .pack.lf]
} -cleanup {
    destroy .pack.l .pack.lf
} -result {162x127+0+0 172x112+0+0}




























































# cleanup
cleanupTests
return









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








1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
    set res [list [winfo geometry .pack.lf]]
    .pack.lf configure -labelanchor ws
    update
    lappend res [winfo geometry .pack.lf]
} -cleanup {
    destroy .pack.l .pack.lf
} -result {162x127+0+0 172x112+0+0}

test pack-20.1 {<<NoManagedChild>> fires on last pack forget} -body {
    global A
    catch {unset A}
    pack [frame .1]
    update
    bind . <<NoManagedChild>> {set A 1}
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    destroy .1
} -result {1}

test pack-20.2 {<Configure> does not fire on last pack forget} -body {
    global A
    catch {unset A}
    pack [frame .1]
    update
    bind . <Configure> {set A 1}
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    destroy .1
} -result {0}

test pack-20.3 {<<NoManagedChild>> does not fire on forelast pack forget} -body {
    global A
    catch {unset A}
    pack [frame .1]
    pack [frame .2]
    update
    bind . <<NoManagedChild>> {set A 1}
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <<NoManagedChild>> {}
    destroy .1 .2
} -result {0}

test pack-20.4 {<Configure> does not fire on last pack forget} -body {
    global A
    catch {unset A}
    pack [frame .1]
    pack [frame .2]
    update
    bind . <Configure> {set A 1}
    pack forget .1
    update
    info exists A
} -cleanup {
    bind . <Configure> {}
    destroy .1 .2
} -result {1}


# cleanup
cleanupTests
return