Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
kverko is currently offline  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?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Using InstallKeyHook
Next Topic: Missing Functions for Layouter
Goto Forum:
  


Current Time: Tue May 14 18:49:08 CEST 2024

Total time taken to generate the page: 0.02837 seconds