[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: Question...
From:       Olaf Jahn <jahno () math ! TU-Berlin ! DE>
Date:       1999-02-26 9:16:31
[Download RAW message or body]

Frank Schiebel <haegar@hhi1203.stud.uni-karlsruhe.de> writes:

> All efforts i made ended in an open dilaog window and a subroutine running 
> through to its end. Is there a possblity to do such things? I hope this isnīt 
> a silly question, but actually i have no experience in programming guiīs at 
> all...

You can set up a separate "background" process via fork/popen to do
the actual computation and block in the middle waiting for data from a
pipe (or whatever). The remaining frontend process now has to write
appropriate data into the pipe after the user has clicked the button.

The nice side effect of this technique is that your GUI still "works"
during a lengthy calculation.

To avoid endless grief make sure that your background process *never*
directly used any GUI function. All interaction with the user has to
be done by the frontend process, which must forward appropriate
data/codes to the background process by means of interprocess
communication.

Olaf

-- 
Olaf Jahn                                      jahno@math.tu-berlin.de
                                   http://www.math.tu-berlin.de/~jahno 
                                  PGP public key available on request.


-- 
         To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
                       "unsubscribe" as the Subject.

	Mailing list concerns should be mailed to <listmaster@redhat.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic