Re: stupid question...



Quoting Bruno Boettcher <bboett bboett dyndns org>:
<snip>
the problem i have is when other downloads are started... they won't
show up in the dialog.... i have to destroy the window and call
another one to see the new trasnfers...
</snip>

Are you creating all of these from one callback?  If so then you are being
bitten by the fact that Perl is not multi-threaded (or at least not in this
case).  You probably need to put a

Gtk2->main_iteration while Gtk2->events_pending;

Inside various loops within your callback.  It is a good idea to do this
whenever you may have heavy processing inside a callback (ie large loops).  For
the longest time in Perl-Gtk I had a problem where the autoresize function of
Gtk::CList would not autoresize to list properly.  It turned out that I was
missing the signal because it was being raised while I was in the callback
putting large amounts of data in the Gtk::CList.  The addition of that one line
of code inside my loop fixed the problem.

N.B. It will slow down your code, but the GUI itself will be more responsive
giving the appearance of faster code (funny eh?).



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