Re: Starting an X-application seems to block the GUI
- From: Paolo Molaro <lupus ximian com>
- To: "gtk-perl-list gnome org" <gtk-perl-list gnome org>
- Subject: Re: Starting an X-application seems to block the GUI
- Date: Sun, 11 Feb 2001 16:09:01 +0100
On 01/30/01 ws wrote:
I see some strange looking things in my application:
-Starting X-applications (e.g. gv and xedit) out of glade/perl pressing
the 'OK' button the GUI is not refreshed (to test send gv to 'Back')
until the child has died.
-The 'Refresh' command sent to the windowmanager works on all tools
(also on Glade's builder) but not on the GUI.
-Pressing GUIs 'Cancel' button does'nt work but will be memorized (GUI
disappears after the child has died).
I can demonstrate this in a mini-app 'tst', consisting of a GtkWindow, a
GtkHBox and the buttons OK and Cancel.
All code in Tst.pm is generated except the sub 'OK_bt_clicked' used to
start the X-applications using back ticks.
The X-application seems to block the GUI, how can I avoid that?
What I really want ist to start a application and read back immediatly
all things going in earlier times to the console.
Optional giving up this guidance after a second (applic has then checked
some things) and have the GUI and the application separated.
Is this possible?
Uhm, I can't undestand exactly what you want to do, but:
`xedit tst.glade &`;
is not the right way to run an external application from a GUI.
system("xedit tst.glade &");
is one correct solution to the problem.
backticks in perl are used to collect the standard output of an application:
to do that in a Gtk app without blocking the user interface, you need to
open a pipe to the app and setup an I/O callback with:
Gtk::Gdk->input_add(fileno(PIPE), 'read', sub {...});
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]