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 <[EMAIL PROTECTED]>
Subject: Displaying console output
To: gtk-perl-list@gnome.org
Message-ID: <[EMAIL PROTECTED]>
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!


_______________________________________________
gtk-perl-list mailing list
gtk-perl-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-perl-list

Reply via email to