Tk Library Source Code

View Ticket
Login
Ticket UUID: 970199
Title: MessageDlg::create Bug and Fix
Type: Bug Version: None
Submitter: nobody Created on: 2004-06-10 08:23:36
Subsystem: bwidget Assigned To: damonc
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-09-28 22:48:10
Resolution: None Closed By: dev_null42a
    Closed on: 2006-09-28 15:48:10
Description:
BUG:

The dialog type abortretryignore has no default button.

In the demo this results in a tcl-error:

bad -default value "": must be abort, retry, ignore, ok, 
cancel, no, or yes
    while executing
"tk_messageBox -icon info -default {} -message 
{Message for MessageBox} -type abortretryignore -title 
Information -parent ."
    ("eval" body line 1)
    invoked from within
"eval [list tk_messageBox] [array get tkMBoxArgs]"
    (procedure "MessageDlg::create" line 81)
    invoked from within

... (further is uninteresting)


FIX:

add a default button even for type abortretryignore:
(line 56 and 57 in messagedlg.tcl):

    switch -- $type {
        abortretryignore {set lbut {abort retry ignore}; 
set defb 0 }

regards
Vera
User Comments: dev_null42a added on 2006-09-28 22:48:10:
Logged In: YES 
user_id=1381097

I applied your fix.  Thanks.