Re: Dialog box strange behaviour
Slaven Rezic <[email protected]> 11 Jul 2007 00:09:59 +0200
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <[email protected]> |
Colin Tuckley <[email protected]> writes: > I have an app which uses a "DialogBox as it's "About Application" box. > > I've noticed that if I close the application using the "X" close window > button in the top right corner of the main window ehile the dialog is being > displayed then although both the dialog and the main window close the > application itself is still running. I can see this using ps and also > because the xterm I started the app from doesn't give me a new prompt. > Typing Ctrl-C in the xterm does then kill the application. > > Is this a bug or am I doing something wrong? > > System is Debian testing/lenny perl, v5.8.8 and perl-tk 804.027 > > Demo application attached. > This sounds like a familiar problem. It is caused by a blocking waitVariable() call, which is never unblocked when the dialog is destroyed. A workaround is to do this yourself: $about_box->OnDestroy(sub { $about_box->{'selected_button'} = $about_box->{'selected_button'} }); after creating the DialogBox widget. I added a similar line to Tk::DialogBox. See change 9718 in Tk's subversion repository https://svn.perl.org/modules/Tk/trunk Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tksm - Perl/Tk program for searching and replacing in multiple files http://ptktools.sourceforge.net/#tksm --++**==--++**==--++**==--++**==--++**==--++**==--++**== ptk mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/ptk