From dd394d420642d423b677fd79d7fb06462aaf1207 Mon Sep 17 00:00:00 2001 From: drh Date: Thu, 19 Jul 2001 20:15:55 +0000 Subject: The new tk_chooseDirectory dialog box implementation was sometimes giving an error like this: can't read "data(list)": no such element in array. The problem is a race condition. This patch should fix the problem. --- library/tkfbox.tcl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 245a11a..00af406 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -11,7 +11,7 @@ # files by clicking on the file icons or by entering a filename # in the "Filename:" entry. # -# RCS: @(#) $Id: tkfbox.tcl,v 1.25 2001/03/30 06:02:20 hobbs Exp $ +# RCS: @(#) $Id: tkfbox.tcl,v 1.26 2001/07/19 20:15:55 drh Exp $ # # Copyright (c) 1994-1998 Sun Microsystems, Inc. # @@ -42,6 +42,7 @@ proc tkIconList {w args} { proc tkIconList_Index {w i} { upvar #0 $w data upvar #0 $w:itemList itemList + if {![info exists data(list)]} {set data(list) {}} switch -regexp -- $i { "^-?[0-9]+$" { if { $i < 0 } { -- cgit v0.12