Hi,
I need the "tk_messageBox" with an additional flag
>>> -timeout <<< with default value "0"
why?
My application creates a couples of messageboxes and every
MessageBox uses the same code to create.
=> if you look into the file "msgbox.tcl" every
MessageBox is
waiting for
>>> tkwait variable tkPriv(button) <<<
to get the button pressed.
this is a problem because if the application runs
overnight the
eval-loop is filled up with "unpressed" MessageBoxes.
to solve this problem the flag "-timeout" was
introduced and
the behaviour is to press the default-button after
"-timeout" ms
code:
tcl 8.3.4
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
152d151
< {-timeout "" "" "0"}
400,402d398
< if {$data(-timeout)} {
< after $data(-timeout) set tkPriv(button)
$data(-default)
< }
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
mfg
aotto
Logged In: YES
user_id=79902
Problem is making this work on Windows. Windows is *by far*
the most restricted environment in its messageBox
capabilities, and the current API exposes pretty much
everything that Win supports. This sucks.
Logged In: YES
user_id=79902
Correct thing to do is to simulate a <Key-Escape> event to
timeout; that's always (supposed to be) the least-damaging
option in some sense. Don't know how to make it happen
though; the Win code doesn't offer much help...
Logged In: YES
user_id=72656
Originator: NO
See also [ 220877 ] Timeout on tk_messageBox