updating (refreshing) a window or widget



Hi !

I have to rewrite some perl/tk code to perl/gtk. Since I'm a beginner in perl/gtk I've come across some problems in rewriting the code but some how I've managed to succeed, until now. My problem is pretty simple. I need to refresh (update) a window (in fact a widget) every X seconds. Here is the relevant part from the perl/tk code that i need to rewrite:


$top->repeat($update_time,sub{
............. Write($command,$sock);
   $id=Tk::After->new($hlist,$read_time,'repeat',sub{
.......... #somewhere:
       if ($buf eq $EOT){
           $id->cancel;
           $wait++;
           }
       }     );
   $hlist->waitVariable(\$wait);

   ...............
});

where, $top is a Tk::Toplevel, and $hlist is a Tk::HList .
So, using Gtk2::Window and Gtk2::SimpleList how should i do refresh the list, every X seconds, and in the meanwhile receive data from a daemon (i don't want the exact code, but the idea and some examples or docs about the api used)? Could you point me to some documentation sources other than gtk2-perl.sourceforge.net/doc/ ?

Thank you !

--
Regards, blitz




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