New submission from eb303 <eric.bru...@pragmadev.com>:

Scenario to reproduce the problem:
- Run the attached script.
- Click the 'Ask confirm' button and answer 'Yes'; it should print 
True, which is the expected answer.
- Click the 'Ask file' button, select any file and confirm.
- Click the 'Ask confirm' button and answer 'Yes'.
The script prints False, which is obviously wrong.
Problem reproduced on Linux Red Hat Fedora Core 4, Suse Enterprise 
Linux 9, Solaris 8 for Sparc and Solaris 10 on Intel. The script works 
as expected on Windows 2000, so it seems to be Unix-specific.

Possible cause: the result of the _show function in tkMessageBox is not 
always a string, apparently depending on what happened before. Changing 
the last line to:
return str(res)
seemed to correct the problem for me.

----------
components: Tkinter
files: dialog-bug.py
messages: 79944
nosy: eb303
severity: normal
status: open
title: Inconsistent/wrong result of askyesno function in tkMessageBox
type: behavior
versions: Python 2.6
Added file: http://bugs.python.org/file12761/dialog-bug.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4961>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to