Hi folks,
I'm having trouble with popup dialogs. If there's one open, it seems the
program won't close. That's not good, because I need to be able to
automatically end the program at a certain time, even if the user hasn't
responded to the dialog. I made a toy example below. Every time the
program tries to quit, it just generates
Tk::Error: 0
("after" script)
I tried using $window->destroy() instead of exit 0. Then the window will
close, but the program won't exit - no errors, nothing. Any ideas? Thanks.
---------
use strict;
use warnings;
use Tk;
use Tk::Dialog;
my $window = MainWindow->new();
$window->repeat(1000, sub { Quit() });
my $popup = $window->Dialog(-title => "Popup", -text => "Oh yeah!");
$popup->Show();
MainLoop();
sub Quit() {
print "Quitting...\n";
exit 0;
}
--
Lyle Kopnicky
Software Project Engineer
Veicon Technology, Inc.
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs