diff options
author | mdejong <mdejong@noemail.net> | 2003-03-12 00:09:31 (GMT) |
---|---|---|
committer | mdejong <mdejong@noemail.net> | 2003-03-12 00:09:31 (GMT) |
commit | 3ed130ba09e63f7480bdd04aa53d87b3071fcb1b (patch) | |
tree | ecef370c50b2d02b66d81ba8deaa5e9601199442 /tests/place.test | |
parent | 3a7da27fbddb964220b386666325077c5cb82ff8 (diff) | |
download | tk-3ed130ba09e63f7480bdd04aa53d87b3071fcb1b.zip tk-3ed130ba09e63f7480bdd04aa53d87b3071fcb1b.tar.gz tk-3ed130ba09e63f7480bdd04aa53d87b3071fcb1b.tar.bz2 |
* generic/tkGrid.c (GridStructureProc, ConfigureSlaves):
Check for a NULL masterPtr and slavePtr in the
GridStructureProc code to ensure that a Gridder
created before some error condition is ignored
when it comes to geometry calculations. This
approach closely matches the pack implementation.
Keep track of a -in argument to a grid command
in order to detect the case of an already
gridded widget that wants to change some options.
The previous implementation could make repeated
and unnecessary calls to Tk_ManageGeometry.
Replace use of "parent" with "master" in comments
throughout the file.
* generic/tkPack.c (PackStructureProc): Check for
a NULL masterPtr before other checks so that a
slave created under certain error conditions
is cleaned up properly.
Replace use of "parent" with "master" in comments
throughout the file.
* generic/tkPlace.c (CreateSlave, ConfigureSlave,
SlaveStructureProc):
Don't call Tk_ManageGeometry in CreateSlave since
this was causing incorrect results in some error
cases. Rework the ConfigureSlave method so that
slave setup is done in one place. The call to
Tk_ManageGeometry was added to the one place
where a slave is setup. When a slave is configured
but the master is not changed, simply goto the
scheduleLayout label. Check for a NULL master
in SlaveStructureProc for the sake of readability.
* tests/grid.test:
* tests/pack.test:
* tests/place.test: Add test to check that a
winfo manager call does not return incorrect
results after an error condition is hit.
[Patch 693063]
FossilOrigin-Name: f1dcb667ca369e764f5ceafaed19d2d2e8480982
Diffstat (limited to 'tests/place.test')
-rw-r--r-- | tests/place.test | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/place.test b/tests/place.test index 4bf47fb..10e45b7 100644 --- a/tests/place.test +++ b/tests/place.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: place.test,v 1.8 2002/11/07 19:10:30 pspjuth Exp $ +# RCS: @(#) $Id: place.test,v 1.9 2003/03/12 00:09:40 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -87,6 +87,12 @@ test place-4.1 {ConfigureSlave procedure, bad -in options} { } [list 1 "can't place .t.f2 relative to itself"] test place-4.2 {ConfigureSlave procedure, bad -in option} { place forget .t.f2 + list [winfo manager .t.f2] \ + [catch {place .t.f2 -in .t.f2} err] $err \ + [winfo manager .t.f2] +} {{} 1 {can't place .t.f2 relative to itself} {}} +test place-4.3 {ConfigureSlave procedure, bad -in option} { + place forget .t.f2 list [catch {place .t.f2 -in .} msg] $msg } [list 1 "can't place .t.f2 relative to ."] |