Hi , I wanted to parse the last line of a file c:\cygwin_syslog.txt and if it 
begins with : tftpd i want to draw a progress bar which is growing from 0 to 
100, in a GUI.
My code is:
open SYSLOG,"<c:/cygwin_syslog.txt" || die "can't open: $!";
        while (<SYSLOG>)
         {
                chomp;
                if (/^tftpd/)
                {
                
                        use Test;
                        plan tests => 15;
                                        

                        my $var = 0;

                        my $pb  = $mw->ProgressBar(-bd => 3, -relief =>                
 
                        'raised', -fg => 'blue', -variable => \$var)->pack;
                        ok(defined($pb),1,"Cannot create");

                        ok(defined(tied($var)),1,"Variable not tied");
                        ok($pb->cget('-from'),0,"Bad from");
                        ok($pb->cget('-to'),100,"Bad to");

                        for my $v (map(10*$_+3,1..10))
                        {
                                $var = $v;
                                ok($pb->cget('-value'),$v,"Value not $v");
                                $mw->update;
                                sleep 1; 
                        }

                                
                                ok(defined(tied($var)),'',"Variable still              
 
                                tied");
                

                }


        }       
        
I ve got 2 problems with this code:
First even the last line of my file doesn't begin with tftp the progress bar 
begin to grow .
When the progress bar has reached 100 it kills all my Gui.

Why?

Thanks. 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to