Re: gtk app with threads



On Thu, 2004-05-13 at 16:46, "Cristóvão B. B. Dalla Costa" wrote:
muppet wrote:

"Cristóvão B. B. Dalla Costa" said:
 

   Glib->idle_add (sub { $self->update_progress (\$downloaded) });
   

I hope you mean Glib::Idle->add(), not Glib->idle_add().  Also, you're taking
a new reference to $downloaded, which i don't think is what you mean.
 


Uh, I was actually using Glib->idle_add, and Perl reported no errors.

I'll try to rewrite as you suggested, thanks.

here's the results when i run something like that, to be honest don't
know how it would work/not complain, maybe something else is going on
with the section of code where it sits:

$ perl
use Glib;
Glib->idle_add (sub { 1; });
Can't locate auto/Glib/idle_add.al in @INC (@INC contains:
/home/rmcfarla/local/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
...
/usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at
- line 2

the Glib::Timeout->add (~200, sub {} ); is the way to go regardless.

-- 
-rm






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