RE: Concurrent processes
- From: "Hugues Bernard" <hbernard gynov org>
- To: <gtk-list gnome org>
- Cc: "Valery Avaux" <vavaux ulb ac be>
- Subject: RE: Concurrent processes
- Date: Wed, 4 Apr 2001 17:13:54 +0200
Salut !
> Hello,
>
> I'm trying to build up a physics simulation with Glade and GTK. The main
> function of the simulation is a function called isingflip(). This
> function must do interations up to 1000000 times but the calculation is
> based on two variables controlled by two scrollbars defined in the main
> window. I have already put signal to pass the value of the scrollbars to
> the variables and it works. But when I launch the simulation by clicking
> on a button called "Simulation", the program does the calculations but
> while doing this, I cannot move anymore the scrollbars to change
> parameters.
>
> Is there a way to let me change parameters ? Maybe lookup signals or
> somenthing like that ? I've heard something about threads but I don't
> know what it is.... I'm really a newbie so if someone could give me some
> very detailled way to do this, it would be very nice.
I had this problem, and I solve it using the idle functions.
Compute only some iterations at a time (say 1000, depending of the time it takes)
As the idle func temporary finished, gtk should be able to process the gui interaction...
Ciao
Hugues
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Hugues Bernard
hbernard gynov org http://gynov.org
>
> Thanks a lot
>
> Valery Avaux
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]