Re: how do I close the dialog and at the same time run a subroutine in the background

On Fri, 2009-12-04 at 20:29 +0800, lointaineimage wrote:
I want to destroy the dialog and call a subroutine when I click the
"yes" button,here is part of my code ,but it doesn't work well,the
dialog is closed until the subroutine is finished.waiting for your

here is part of my code:
my $dialog =Gtk2::MessageDialog->new
  ($window,'destroy-with-parent','something to confirm','yes-no',");
  my $response = $dialog->run;
  if($response eq "yes"){

gtk-perl-list mailing list
gtk-perl-list gnome org

I think this would do the trick:


Gtk2->main_iteration() while Gtk2->events_pending(); # Inserted line


PÃter JuhÃsz

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]