FAQ 5.11 (Why doesn´t my progressbar upate) with gtk-perl



Hi!
Im just starting my second program with perl-gtk (Newbie alert!!) and
need some help.
The program reads a big (ca. 2MB) Datafile wich takes quite some time,
so i would like to give the users some feedback that "there is
something going on" with a Gtk::ProgressBar:
 
while(defined($line = <DATA> )){
	if ($i % 100 == 0) {
	    $val=($i/($count));	
	    $pbar->update($val);	
	    while (Gtk::Gdk->events_pending) {
		Gtk->main_iteration;
		print SDTERR "Pending...\n";
	    }
	}
	$i++;
	do_something...
}	

This doesn´t work. The progressbar doesn´t update, althoug some (~10)
"Pending..."s  are printed on STDERR. so the questiions are:

- Is this the correct list for gtk-perl questions?
	(If not: sorry..)

- Why doesn´t the code work?

- Is there another way to do it?

Greetings,
	Ramin

System info:
-Debian slink-potato mix, Packages:
- libgnome-perl Version: 0.6123-1
- perl-5.005    Version: 5.005.03-2
- gdk-imlib1    Version: 1.9.7-2
- libglib1.2    Version: 1.2.5-1
- libgtk1.2     Version: 1.2.5-1



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