The problem I was having was how to get any new line back to the GUI.  Once
you do a Win32::GUI::Dialog, the perl script basically stops, and you can
only work with the GUI.  How would I set up a Sub to run in the background
and update the GUI with any changes?  I first thought of an alarm, but that
function is not implemented on Win32 v5.6.1 (Activestate).  I tried to use
AddTimer, but that just seemed to do absolutely nothing once it hit the
$file->read part (File::Tail).  Is my only option to thread something off?

I'm farily new to both Perl and Win32::GUI, so if this sounds ridiculous
please excuse me.

Thanks.

Len.



                                                                                
                                                       
                      "Erick Bourgeois" <[EMAIL PROTECTED]>                     
                                                            
                      Sent by:                                      To:      
perl-win32-gui-users@lists.sourceforge.net                
                      [EMAIL PROTECTED]         cc:                             
                                   
                      ceforge.net                                   Subject: 
Re: [perl-win32-gui-users] File Monitoring Script         
                                                                                
                                                       
                                                                                
                                                       
                      10/08/2003 04:40 PM                                       
                                                       
                                                                                
                                                       
                                                                                
                                                       




On Wed, 8 Oct 2003 14:13:25 -0500, [EMAIL PROTECTED] said:

> I am looking to write a GUI front end to what basically amounts to a
"tail
> -f", however, I am not sure how to go about doing this.  I would like to
> use a ListView object to highlight any lines that come through as
"Failed",
> but i'm not sure how to go about updating the ListView with new
> information.  Could someone please give me some insight as to how I could
> write this front end to use either the "tail -f" command or even the
> File::Tail module so that any changes are automagically updated in the
> ListView.

One way of updating the ListView is to InsertItems for every new line added
to the file your application is watching. If, for example, you are
retrieving each
line as a string then you could also test for your "Failed" substring and
consequently change the color of the list item. Please see the
documentation
that came with the module or the online version here:

http://jeb.ca/perl/win32-gui-docs/index.pl/win32-gui-listview

--
-erick-


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users








Reply via email to