tkMessageBox returns 0 errorneously the first time -URGENT-Plz help ....

Abhi Haz abhisek_hazarika at yahoo.com
Fri Apr 4 15:01:42 CEST 2003


I am using Tkinter interface for Python1.5 ...
On a particular quit routine...I'm doing the following-

******************************************************
...all imports go here...

...some app...from where onQuit is invoked if user presses a ceertain "quit"
button on the toolbar of the app....

def onQuit(self):
ans = tkMessageBox.askokcancel('Verify','Are you sure you want to quit?')
if ans:
    self.quit()


*******************************************************
The strange thing about this is that the first time this is invoked 
no matter what the user chooses-ok or cancel, ans = 0
The next invocation onwards picks the value correctly....

Python,Tk gurus...your help reqd....

Rgds
Abhi




More information about the Python-list mailing list