[Glade-users] Animation
- From: paskari007 at yahoo.ca (PEYMAN ASKARI)
- Subject: [Glade-users] Animation
- Date: Wed, 15 Oct 2008 15:04:26 -0400 (EDT)
One thing I can't get my head around is how to set up a loop to run along side the event driven nature of
GUIs.
For example, I have a simulator which simulates neurons. now I have files which implement all the neurons,
and synapses, and updates them. When the user clicks 'next' it figures out which ones generate action
potentials, and then the drawing area changes that neurons color from black to red. Pretty standard stuff
But if the user clicks 'Play', then the simulator goes into a loop, and checks for action potentials
continuously. The problem with this is that control is not returned to the GUI until the loop exits, and
therefore the GUI is never updated it.
Am I going to have to make my program multithreaded, or is there a way of having GTK call the function every
1 second for example.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20081015/5fceeb89/attachment.html
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]