summaryrefslogtreecommitdiffstats
path: root/library/bgerror.tcl
diff options
context:
space:
mode:
authorericm <ericm>2000-04-11 18:19:06 (GMT)
committerericm <ericm>2000-04-11 18:19:06 (GMT)
commitb78c23a7e207a18aa3049d06660f6ce12b2b0fbf (patch)
tree93b76a26d364a66061b16bef11eafc1d4cebe992 /library/bgerror.tcl
parent12305c29303ea1ccb1ad9f4a66c68fbce06468dc (diff)
downloadtk-b78c23a7e207a18aa3049d06660f6ce12b2b0fbf.zip
tk-b78c23a7e207a18aa3049d06660f6ce12b2b0fbf.tar.gz
tk-b78c23a7e207a18aa3049d06660f6ce12b2b0fbf.tar.bz2
* library/bgerror.tcl: Moved check for withdrawn state after check
for tkerror; this was causing problems when tkerror was used.
Diffstat (limited to 'library/bgerror.tcl')
-rw-r--r--library/bgerror.tcl32
1 files changed, 16 insertions, 16 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index 15f9448..f9dc8d8 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -4,7 +4,7 @@
# posts a dialog box with the error message and gives the user a chance
# to see a more detailed stack trace.
#
-# RCS: @(#) $Id: bgerror.tcl,v 1.6 2000/04/10 23:19:58 ericm Exp $
+# RCS: @(#) $Id: bgerror.tcl,v 1.7 2000/04/11 18:19:06 ericm Exp $
#
# Copyright (c) 1992-1994 The Regents of the University of California.
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
@@ -24,21 +24,6 @@
proc bgerror err {
global errorInfo tcl_platform
- # Normally, the bgerror dialog is made transient with respect to "." (due
- # to the implementation of tk_dialog). On some systems (like Windows),
- # when a window is withdraw or iconified, it's transient windows go with
- # it. Unfortunately, there is also a grab on the dialog (again because of
- # the implementation of tk_dialog). So if "." is withdrawn or iconified
- # and the user gets a bgerror, the app will hang, for no apparent reason.
- #
- # One (somewhat hacky) way to address this is to un-transient the dialog
- # if "." is withdrawn or iconified.
- after idle {
- if { ![winfo viewable .bgerrorDialog] } {
- wm transient .bgerrorDialog {}
- }
- }
-
# save errorInfo which would be erased in the catch below otherwise.
set info $errorInfo ;
@@ -55,6 +40,21 @@ proc bgerror err {
set ret [catch {tkerror $err} msg];
if {$ret != 1} {return -code $ret $msg}
+ # Normally, the bgerror dialog is made transient with respect to "." (due
+ # to the implementation of tk_dialog). On some systems (like Windows),
+ # when a window is withdraw or iconified, it's transient windows go with
+ # it. Unfortunately, there is also a grab on the dialog (again because of
+ # the implementation of tk_dialog). So if "." is withdrawn or iconified
+ # and the user gets a bgerror, the app will hang, for no apparent reason.
+ #
+ # One (somewhat hacky) way to address this is to un-transient the dialog
+ # if "." is withdrawn or iconified.
+ after idle {
+ if { ![winfo viewable .bgerrorDialog] } {
+ wm transient .bgerrorDialog {}
+ }
+ }
+
# Ok the application's tkerror either failed or was not found
# we use the default dialog then :
if {$tcl_platform(platform) == "macintosh"} {