Tried.... and work fine for me....
Thanks a lot...
Valery Avaux
Joshua Horvath a écrit :
>
> Valery Avaux wrote:
> >
> > I don't really need to have totally threaded functions but I would
like
> > to be able to change the values of two parameters while the main
part of
> > the simulation runs. Here follows parts of the code I currently
use:
>
> [snip]
>
> > I could try your suggestion: while(gtk_events_pending())
> > gtk_main_interation(), but I don't see where and who to do this...
If
> > you could tell me....
>
> It depends on how often you want the values of the scrollbars to be
checked. If
> you want to be able to update the values after every iteration, just
put the
> while (gtk...) loop at the end of the isingflipl() function. If you
don't need
> this much control, put it inside the nbsweep loops.
>
> e.g.
>
> void isingflipl()
> {
> [stuff]
> while (gtk_events_pending())
> gtk_main_iteration();
> }
>
> or
>
> if (genre == 1)
> for (i=0; i<nbsweep; ++i)
> {
> for (j=0; j<nbflip; ++j)
> {
> isingflip1();
> }
> s=magnet();
> fprintf(ifp, "%d %f\n",i,s);
> while (gtk_events_pending())
> gtk_main_iteration();
> }
>
> -Josh
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list