ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-tk
perl-tk
Re: Dialog box strange behaviour
by Slaven Rezic other posts by this author
Jul 10 2007 3:18PM messages near this date
Dialog box strange behaviour | ptk list archives
SOURCE Colin Tuckley <colin@[...].org>  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_butto
n'} });

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
ptk@[...].edu
https://mailman.stanford.edu/mailman/listinfo/ptk
Thread:
Colin Tuckley
Slaven Rezic

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved