Menu

#135 tk_messageBox -timeout option

open
5
2007-10-30
2003-10-07
Anonymous
No

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

Discussion

  • Donal K. Fellows

    • assigned_to: hobbs --> dkf
     
  • Donal K. Fellows

    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.

     
  • Donal K. Fellows

    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...

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-30

    Logged In: YES
    user_id=72656
    Originator: NO

    See also [ 220877 ] Timeout on tk_messageBox

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-30
    • summary: add "timeout" option --> tk_messageBox -timeout option
     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.