Tk Source Code

View Ticket
Login
Ticket UUID: 819290
Title: tk_messageBox -timeout option
Type: Patch Version: None
Submitter: nobody Created on: 2003-10-07 14:25:05
Subsystem: 38. [tk_messageBox] Assigned To: dkf
Priority: 5 Medium Severity:
Status: Open Last Modified: 2007-10-31 02:49:04
Resolution: None Closed By:
    Closed on:
Description:
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
User Comments: hobbs added on 2007-10-31 02:49:04:
Logged In: YES 
user_id=72656
Originator: NO

See also [ 220877 ] Timeout on tk_messageBox

dkf added on 2003-10-14 05:12:29:
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...

dkf added on 2003-10-08 20:19:39:
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.