Re: blocking code after main loop
- From: "Jens Luedicke" <jens luedicke gmail com>
- To: "Michael Hartmann" <michael hartmann as-netz de>
- Cc: gtk-perl-list gnome org
- Subject: Re: blocking code after main loop
- Date: Mon, 9 Oct 2006 20:47:03 +0200
On 10/9/06, Michael Hartmann <michael hartmann as-netz de> wrote:
my $window = Gtk2::Window->new;
$window->signal_connect("delete-event" => sub { Gtk2->main_quit; 0;});
my $button = Gtk2::Button->new("Close me");
$button->signal_connect(clicked => sub { Gtk2->main_quit; } );
Why is the gui still available when perl runs sleep?
And related to this question: How can I avoid this problem?
Hide the window before quitting the gtk main loop:
$button->signal_connect(clicked => sub { $window->hide; Gtk2->main_quit; } );
jens
--
Jens Luedicke
web: http://perldude.de/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]