timeout wont run without a 'print'!?
- From: Thomas Ledbetter <tledbett revelstone net>
- To: gtk-perl-list gnome org
- Subject: timeout wont run without a 'print'!?
- Date: Wed, 02 Jan 2008 22:38:13 -0500
Hey wondering if anyone can shed some light on this crazy issue:
I have a simple Gtk2 perl program. I used glade to design the interface
and use Gtk2::GladeXML to render it.
The interface consists of 6 text entry widgets and a couple of buttons.
I have a timeout set up to run every second, such that the 6 text entry
widgets get a random number displayed in them.
The weird thing is: the timeout itself only runs once and then stops
after the first iteration *unless* I put a 'print' statement in the
subroutine!?! And then it runs fine!?! But only with the 'print;' in
there!?!?
I dont even have to actually print anything - not even a new line! As
long as I keep a blank 'print;' statement in the timeout subroutine, it
runs fine once a second, and the text entry widgets get updated.
Its crazy!
Any ideas here? Why should the execution of the timeout be dependent on
whether there is text output to STDOUT?!?
I can provide source if someone wants to take a look.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]