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
tkinter Dialog fails when more than four buttons are used #43009
Comments
Example code: #! /usr/bin/env python
import Dialog
from Tkinter import *
root = Tk()
Button(root, text="Hello!").pack()
root.update()
dialog = Dialog.Dialog(None, {'title': 'Test Dialog',
'text': "Text...",
'bitmap': '',
'default': 0,
'strings':
('Button0','Button1','Button2','Button3','Button4')})
print 'dialog: ', dialog.num This example works well, except when clicking in
Button4 that fails:
Traceback (most recent call last):
File "test.py", line 12, in ?
dialog = Dialog.Dialog(None, {'title': 'Test Dialog',
File "/usr/lib/python2.3/lib-tk/Dialog.py", line 21,
in __init__
cnf['bitmap'], cnf['default'],
TypeError: getint() argument 1 must be string, not tuple I tried to trace the error (learning in the way a In /usr/lib/python2.3/lib-tk/Dialog/py the exception is The impression I got after browsing the sources of I have this problem when using python2.3 or python2.4 A quick workaround (although I 'm not sure if it would Hernan |
I just tried it here and it still happens, it also happens for the 11th I'm investigating this. For some reason a pixel object is being returned inside a tuple. |
The workaround is actually setting wantobjects to 0, which I doubt
Apparently trying to fix this in Python would case some (major?) changes |
This is a workaround and seems to be the way to go. |
bpo-4333 fixes this too, btw |
Interesting.. I tried testing Dialog for that bug, but generating Attaching the test I tried just in case. |
I tried the example code under 3.7 and it produced the correct the output. I think this issue can be closed. |
I ported OP's example to Python 3 and I agree with Cheryl that this is fixed now. |
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: