Have you thought about setting up a separate thread when the process first 
starts?

It could do all the work and dump output into a socket or pipe. The 
receiving thread then just checks the socket (I have more experience 
there, than with pipes) occasionally for waiting input.

Greg





[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
09/10/03 23:43

 
        To:     perl-win32-gui-users@lists.sourceforge.net
        cc: 
        Subject:        Re: [perl-win32-gui-users] File Monitoring Script



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









-------------------------------------------------------
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



*************************************** 
This email message (and any accompanying file attachments) may contain 
confidential or privileged information and is intended for the sole use of the 
addressee(s) named above. If you are not the intended recipient, or the person 
responsible for delivering this message to the intended recipient, please 
notify Toowoomba City Council immediately and destroy any copies of the 
original message.
Any unauthorised review, use, alteration, disclosure or distribution of this 
email (including any attachments) by an unintended recipient is prohibited. 
While all care is taken, Council cannot guarantee that this email message (and 
any accompanying file attachments) are free of viruses. 
The Council accepts no responsibility for the content of any email which is 
sent by an employee which is of a personal nature or which represents the 
personal view of the sender. 
***************************************

Reply via email to