summaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorculler <culler>2019-03-03 17:04:13 (GMT)
committerculler <culler>2019-03-03 17:04:13 (GMT)
commitffc8760419eff5493bbd2be5f8d8e585c1e8d95c (patch)
tree6efc7c0d3bf6ad391210d6003e95240081ca3fa8 /library
parent4acf3a1da92f5ef0bc2dbe3ac5fa457ae0ae2836 (diff)
downloadtk-ffc8760419eff5493bbd2be5f8d8e585c1e8d95c.zip
tk-ffc8760419eff5493bbd2be5f8d8e585c1e8d95c.tar.gz
tk-ffc8760419eff5493bbd2be5f8d8e585c1e8d95c.tar.bz2
Increase the size of the ring buffer for Aqua, and modify bgerror so it
doesn't try (and fail) to post a dialog inside [NSView drawRect].
Diffstat (limited to 'library')
-rw-r--r--library/bgerror.tcl17
1 files changed, 11 insertions, 6 deletions
diff --git a/library/bgerror.tcl b/library/bgerror.tcl
index b15387e..574ad8b 100644
--- a/library/bgerror.tcl
+++ b/library/bgerror.tcl
@@ -97,7 +97,7 @@ proc ::tk::dialog::error::ReturnInDetails w {
# Arguments:
# err - The error message.
#
-proc ::tk::dialog::error::bgerror err {
+proc ::tk::dialog::error::bgerror {err {flag 1}} {
global errorInfo
variable button
@@ -106,15 +106,20 @@ proc ::tk::dialog::error::bgerror err {
set ret [catch {::tkerror $err} msg];
if {$ret != 1} {return -code $ret $msg}
- # Ok the application's tkerror either failed or was not found
- # we use the default dialog then :
+ # The application's tkerror either failed or was not found
+ # so we use the default dialog. But on Aqua we cannot display
+ # the dialog if the background error occurs in an idle task
+ # being processed inside of [NSView drawRect]. In that case
+ # we post the dialog as an after task instead.
set windowingsystem [tk windowingsystem]
if {$windowingsystem eq "aqua"} {
- set ok [mc Ok]
- } else {
- set ok [mc OK]
+ if $flag {
+ after 500 [list bgerror "$err" 0]
+ return
+ }
}
+ set ok [mc OK]
# Truncate the message if it is too wide (>maxLine characters) or
# too tall (>4 lines). Truncation occurs at the first point at
# which one of those conditions is met.