in reply to Re: Re: Perl::TK - fileevent and script execution theory
in thread Perl::TK - fileevent and script execution theory

I bet the continuously available fileevents are taking higher priority than the idleevents which is where the actual repaint is done. As Tk::Widget says:
$widget->idletasks One of two methods which are used to bring the application +``up to date'' by entering the event loop repeated until all pendin +g events (including idle callbacks) have been processed. If the idletasks method is specified, then no new events or + errors are processed; only idle callbacks are invoked. This causes + opera- tions that are normally deferred, such as display updates a +nd win- dow layout calculations, to be performed immediately. The idletasks command is useful in scripts where changes ha +ve been made to the application's state and you want those changes +to appear on the display immediately, rather than waiting for +the script to complete. Most display updates are performed as i +dle callbacks, so idletasks will cause them to run. However, th +ere are some kinds of updates that only happen in response to event +s, such as those triggered by window size changes; these updates wi +ll not occur in idletasks.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re: •Re: Re: Re: Perl::TK - fileevent and script execution theory
by crabbdean (Pilgrim) on Mar 14, 2004 at 04:40 UTC
    Thanks Merlyn, that is exactly the answer I was looking for in theory (but I'm yet to test it). But it seems right. This is what I thought was happening but I wasn't sure how to resolve it. I have to race out the door now and will test this tomorrow, or later tonight. Two preliminary question that I'm sure I'll answer later anyway in testing:

    1. Do you write this into your Mainloop or into the end of the subroutine.
    2. Which widget is it assigned to? MainWindow or the text box?

    No biggy if you don't answer. It will only take me a few mins to work it out, but I have to race now. I'll post an update, conclusion and discussional results with my findings at the end of all this.

    Dean
    The Funkster of Mirth
    Programming these days takes more than a lone avenger with a compiler. - sam
    RFC1149: A Standard for the Transmission of IP Datagrams on Avian Carriers