Home » U++ Library support » U++ Widgets - General questions or Mixed problems » Refresh(), Paint(Draw& w), or something else nearby?
Refresh(), Paint(Draw& w), or something else nearby? [message #10381] |
Wed, 04 July 2007 20:58  |
kverko
Messages: 8 Registered: December 2005 Location: Porva, Hungary
|
Promising Member |
|
|
Hi!
I have coded a little cell automat program. When I have put the step to the next cycle into a left click event handler, it did work. Now I use the SetTimeCallback function from the AnimatedHello example and it does work.
What I can no manage is to put the cycle control into the execution flow. For example I did:
function Steps()
{
for(int i=0;i<1000;i++)
{
Step();
}
}
function Step()
{
Refresh();
}
And it does not work. The Step function is the same as in the SetTimeCallback! (Or in LeftDown.) The counting of next generation is in the Paint(Draw& w) function.
I am afraid of the counting the next generation could be longer than the timing of callback on a slower machine. Anyway I can not see, why does not work the simple code above. Or how other way can I set up the cycle control?
|
|
|
 |
|
Refresh(), Paint(Draw& w), or something else nearby?
By: kverko on Wed, 04 July 2007 20:58
|
 |
|
Re: Refresh(), Paint(Draw& w), or something else nearby?
By: mrjt on Thu, 05 July 2007 12:07
|
 |
|
Re: Refresh(), Paint(Draw& w), or something else nearby?
By: kverko on Thu, 05 July 2007 21:15
|
 |
|
Re: Refresh(), Paint(Draw& w), or something else nearby?
By: mrjt on Fri, 06 July 2007 12:02
|
 |
|
Re: Refresh(), Paint(Draw& w), or something else nearby?
By: kverko on Fri, 06 July 2007 16:19
|
Goto Forum:
Current Time: Mon Apr 28 23:31:59 CEST 2025
Total time taken to generate the page: 0.03445 seconds
|