diff options
-rw-r--r-- | library/choosedir.tcl | 4 | ||||
-rw-r--r-- | library/tk.tcl | 10 | ||||
-rw-r--r-- | library/tkfbox.tcl | 4 |
3 files changed, 12 insertions, 6 deletions
diff --git a/library/choosedir.tcl b/library/choosedir.tcl index 68dd9b0..33a66b1 100644 --- a/library/choosedir.tcl +++ b/library/choosedir.tcl @@ -118,7 +118,9 @@ proc ::tk::dialog::file::chooseDir:: {args} { foreach trace [trace info variable data(selectPath)] { trace remove variable data(selectPath) [lindex $trace 0] [lindex $trace 1] } - $data(dirMenuBtn) configure -textvariable {} + if {[winfo exists $data(dirMenuBtn)]} { + $data(dirMenuBtn) configure -textvariable {} + } # Return value to user # diff --git a/library/tk.tcl b/library/tk.tcl index 89267d6..e00f073 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -178,10 +178,12 @@ proc ::tk::RestoreFocusGrab {grab focus {destroy destroy}} { catch {focus $oldFocus} grab release $grab - if {$destroy eq "withdraw"} { - wm withdraw $grab - } else { - destroy $grab + if {[winfo exists $grab]} { + if {$destroy eq "withdraw"} { + wm withdraw $grab + } else { + destroy $grab + } } if {[winfo exists $oldGrab] && [winfo ismapped $oldGrab]} { if {$oldStatus eq "global"} { diff --git a/library/tkfbox.tcl b/library/tkfbox.tcl index 0c3cc0c..f034778 100644 --- a/library/tkfbox.tcl +++ b/library/tkfbox.tcl @@ -226,7 +226,9 @@ proc ::tk::dialog::file:: {type args} { foreach trace [trace info variable data(selectPath)] { trace remove variable data(selectPath) {*}$trace } - $data(dirMenuBtn) configure -textvariable {} + if {[winfo exists $data(dirMenuBtn)]} { + $data(dirMenuBtn) configure -textvariable {} + } return $Priv(selectFilePath) } |