summaryrefslogtreecommitdiffstats
path: root/library/tkfbox.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'library/tkfbox.tcl')
-rw-r--r--library/tkfbox.tcl14
1 files changed, 8 insertions, 6 deletions
diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl
index 29fc665..b3c7156 100644
--- a/library/tkfbox.tcl
+++ b/library/tkfbox.tcl
@@ -10,7 +10,7 @@
# "Directory" option menu. The user can select files by clicking on the
# file icons or by entering a filename in the "Filename:" entry.
#
-# RCS: @(#) $Id: tkfbox.tcl,v 1.74 2009/04/14 18:09:50 dkf Exp $
+# RCS: @(#) $Id: tkfbox.tcl,v 1.75 2009/10/22 10:12:57 dkf Exp $
#
# Copyright (c) 1994-1998 Sun Microsystems, Inc.
#
@@ -172,9 +172,11 @@ proc ::tk::dialog::file:: {type args} {
# Default type and name to first entry
set initialtype [lindex $data(-filetypes) 0]
set initialTypeName [lindex $initialtype 0]
- if {($data(-typevariable) ne "")
- && [uplevel 1 [list info exists $data(-typevariable)]]} {
- set initialTypeName [uplevel 1 [list set $data(-typevariable)]]
+ if {$data(-typevariable) ne ""} {
+ upvar #0 $data(-typevariable) typeVariable
+ if {[info exists typeVariable]} {
+ set initialTypeName $typeVariable
+ }
}
foreach type $data(-filetypes) {
set title [lindex $type 0]
@@ -1133,8 +1135,8 @@ proc ::tk::dialog::file::Done {w {selectFilePath ""}} {
&& [info exists data(-filetypes)] && [llength $data(-filetypes)]
&& [info exists data(filterType)] && $data(filterType) ne ""
} then {
- upvar 4 $data(-typevariable) initialTypeName
- set initialTypeName [lindex $data(filterType) 0]
+ upvar #0 $data(-typevariable) typeVariable
+ set typeVariable [lindex $data(filterType) 0]
}
}
bind $data(okBtn) <Destroy> {}