re: Displaying console output
- From: Jeff Hallock <Jhallock WBandA com>
- To: "'gtk-perl-list gnome org'" <gtk-perl-list gnome org>
- Subject: re: Displaying console output
- Date: Tue, 22 Apr 2008 10:40:57 -0400
You can put this line throughout your code or in a loop to update pending events (This is also good to use
for updating progress bars.)
# Run the main loop as long as events are pending
Gtk2->main_iteration while ( Gtk2->events_pending );
You can also use POE (Perl Object Environment) which allows your program to multitask.
Message: 1
Date: Mon, 21 Apr 2008 17:12:51 -0700 (PDT)
From: Thomas Rosario <thomasfrlennon yahoo com>
Subject: Displaying console output
To: gtk-perl-list gnome org
Message-ID: <565064 34785 qm web65408 mail ac4 yahoo com>
Content-Type: text/plain; charset=us-ascii
Hi All,
I'm trying to build a GUI to show console output of an existing application. What I've done is 'clicked'
signal_connect from Gtk2::Button will execute the application and save the output into a Gtk2::TextBuffer
which will be displayed in Gtk2::TextView.
At the moment, if the button is pressed, the whole GUI will 'freeze' and after the application execution is
finished, the complete output is displayed. My question is, how can it be done so textview will be updated in
real time with the console output instead of waiting the whole execution to be finished.
Many Thanks!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]