P
peter
I have a weird problem in some code I am writing. The user selects a
number of files from a list and then can select an option which will
rename the selected files. Before the process starts, a yes/no dialog
box pops up just to confirm.
Most of the time this works fine, but occasionally it seem the dialog
box gets into a state where it always returns False, irrespective of
the button clicked.
I must be doing something wrong, but I just can't see it! Any
suggestions?
<code>
import tkMessageBox as mb
:
:
if action=='Rename':
yn=mb.askyesno(file_list[0],'Ok to rename %d selected
file(s)' % file_count)
print 'Response: ',yn # Debug only
if not yn: exit_flag=1
</code>
number of files from a list and then can select an option which will
rename the selected files. Before the process starts, a yes/no dialog
box pops up just to confirm.
Most of the time this works fine, but occasionally it seem the dialog
box gets into a state where it always returns False, irrespective of
the button clicked.
I must be doing something wrong, but I just can't see it! Any
suggestions?
<code>
import tkMessageBox as mb
:
:
if action=='Rename':
yn=mb.askyesno(file_list[0],'Ok to rename %d selected
file(s)' % file_count)
print 'Response: ',yn # Debug only
if not yn: exit_flag=1
</code>