linux454 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to get a Perl/Tk script to monitor logfiles, I'm using Threads (and before you say it yes I know threads are experimental, but they are working for me), anyway, I'm using the HList widget to colorize and manage different lines from the logfiles based on whether they match a given pattern. I have the monitoring and pattern matching working. But when I go to add the line to the HList widget, it doesn't display until I move the mouse inside the application window. I've tried just about every combination of update(), after(), and repeat(). That I could come up with and nothing helps. This is going to be run on an unmanned box to display on a projection screen so moving the mouse over the application every now and then is not the fix. Any help would be greatly appreciated. I've looked everywhere I know to look, but to no avail. None of the cookie cutter answers seem to be applicable to this problem. TIA.

Replies are listed 'Best First'.
Re: Noninteractive Refresh
by traveler (Parson) on Apr 18, 2001 at 00:07 UTC
    I have not used Tk in a while as I am now using Gtk for my Perl GUIs (I like it better). At any rate, I think you want update idletasks whose code is roughly Tk->update("idletasks");

    If that fails, it could be a window manager problem. I have seen WM problems with Tk, but they could all be gone by now...

    --john

      I did try the update("idletasks") but unfortunately that didn't help, I also tried using a different WM but again to no avail. I would love to switch to Gtk but the target platform is Solaris and I'd rather use Tk than go through the rigors of putting Gtk+ on Solaris. Can you point me in the direction of some additional documentation? Thanks for your response.