On 5 Feb 2010, at 13:26, Jose Marcelo Auler wrote: > I've made a key generator in order to automatic test stability of > my software, and turned out that Fl::run() returns(exits) after a > while. > I first tried a key generator of 20Hz, and it takes a lot of time > to be in this condition, but with 50Hz(50 keys per second) it's > very quick. > In my mainscreen I overwrote the handle to not do anything with > FL_CLOSE or FL_HIDE and it goes there, but even with the return 1; > (in FL_CLOSE and FL_HIDE) it returns from Fl::run(). Is there > another way to return from Fl::run()? I'm pressuming FL queue > reached a maximum size or something like that...
I can't reproduce this - but maybe I misunderstood your set up. I think you have written a test harness to generate synthetic keyboard inputs at a rate of 50Hz to test your code, but this keystroke generator expires after a sort while, for some reason? How is the timing generated? Is it using the FL timeout callbacks or...? Anyway, so far as I know, Fl::run() returns when there are no windows left open, so perhaps all your windows have closed for some reason? I'm not sure what you are doing in your handle method, either. Can you post a small compileable example that shows what it is that you are doing? Also - what host platform are you on (not that it should make any difference of course.) > Another interesting fact, is that using Fl_Box(or even Fl_Label or > Fl_Button) to draw label could be slow(at least in my software). I > will explain better. If I use a buffer outside the Fl_Box/Fl_Label > and when I change this buffer I just call (Fl_Box object)->redraw > (), it's ok, it's fast. But if every time the buffer gets changed I > call (Fl_Box)->label((new string array)); it gets slow. And in my > software this is done in cycles(every 1/2sec), so it's making > difference. Does anyone have a clue what could be or if I'm not > using in the intended way? I could subclass Fl_Label to solve this > problem, but I want to understand what is really happening. Again, I don't think I have understood what you are doing - can you also make a minimal example of this that shows the effect that you are seeing? -- Ian _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

