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)
commit0bd9d904e73bc0d302afe8b82bb2b9186c7801a9 (patch)
tree0ee52a4755cfc619e731dbddf8f550b6ff5a1e0d /tests
parent5c2ad0a34a4a78a7879cd6dc7e4523f789aa3d0e (diff)
downloadtk-0bd9d904e73bc0d302afe8b82bb2b9186c7801a9.zip
tk-0bd9d904e73bc0d302afe8b82bb2b9186c7801a9.tar.gz
tk-0bd9d904e73bc0d302afe8b82bb2b9186c7801a9.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