summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-04-03 04:41:08 (GMT)
committerhobbs <hobbs>2001-04-03 04:41:08 (GMT)
commit553b8f028b34922f9cb037598eea703141abee5b (patch)
tree0ee52a4755cfc619e731dbddf8f550b6ff5a1e0d /tests
parentedbaf5d094e716436538e73173a65bce146a5a3d (diff)
downloadtk-553b8f028b34922f9cb037598eea703141abee5b.zip
tk-553b8f028b34922f9cb037598eea703141abee5b.tar.gz
tk-553b8f028b34922f9cb037598eea703141abee5b.tar.bz2
* tests/listbox.test: added test listbox-27.1, delete during
scrollbar update * generic/tkListbox.c (DestroyListbox, ListboxEventProc): corrected listbox to make proper use of Tcl_EventuallyFree and protect against unusual listbox deletion.
Diffstat (limited to 'tests')
-rw-r--r--tests/listbox.test18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/listbox.test b/tests/listbox.test
index 45443f6..8d3d75e 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: listbox.test,v 1.13 2000/07/28 16:34:55 ericm Exp $
+# RCS: @(#) $Id: listbox.test,v 1.14 2001/04/03 04:41:08 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
source [file join [pwd] [file dirname [info script]] defs.tcl]
@@ -2101,12 +2101,20 @@ test listbox-26.5 {listbox disabled state disallows active modification} {
} 0
resetGridInfo
-catch {destroy .l2}
-catch {destroy .t}
-catch {destroy .e}
-catch {destroy .partial}
+eval destroy [winfo children .]
option clear
+test listbox-27.1 {widget deletion while active} {
+ destroy .l
+ pack [listbox .l]
+ update
+ .l configure -cursor xterm -xscrollcommand { destroy .l }
+ update idle
+ winfo exists .l
+} 0
+
+eval destroy [winfo children .]
+
# cleanup
::tcltest::cleanupTests
return