New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent/wrong result of askyesno function in tkMessageBox #49211
Comments
Scenario to reproduce the problem:
Possible cause: the result of the _show function in tkMessageBox is not |
I've verified it, it is indeed a bug in tkMessageBox.py which is very |
I guess this will have to be accepted without any tests, unless someone |
I've also confirmed this one (by chance). I'm on ubuntu linux, and I am seeing the problem in both 2.6 and 3.1, both using Tk 8.5. I don't see the problem on my windows install (Vista, python 2.5, not sure of the Tk version right now). But I did find a hack around this by explicitly creating and destroying a top level window following the askdirectory() dialog. Try this snippet on linux/unix, the call to askyesno() returns False always. import tkFileDialog,tkMessageBox,Tkinter
theDirectory=tkFileDialog.askdirectory()
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print addDirectory But the following works fine: import tkFileDialog,tkMessageBox,Tkinter
toplevel=Tkinter.Tk()
theDirectory=tkFileDialog.askdirectory()
toplevel.destroy()
addDirectory=tkMessageBox.askyesno('a dialog','Add a directory?')
print addDirectory |
the patch works for me with tcl8.5 |
fixed for 2.7, 3.1, 3.2, commit pending for 2.6 until after the 2.6.5 release |
committed to the 2.6 branch as well |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: