On 27 Oct 2011, at 19:42, Armin Steinhoff wrote:
> I have modified the main loop of the example "table-simple.cxx" as shown
> below:
Um, what are you trying to achieve?
The changes you've made don't really make a lot of sense, I'm sorry to tell
you...
> int main(int argc, char **argv)
> {
> for(;;)
Um, what?
Are you trying to make a loop that never expires?
If so:
a) Why?
b) I prefer while(1) for that myself...
> {
> Fl_Double_Window win(900, 400, "Simple Table");
> MyTable table(20,20,880,380);
> win.end();
> win.resizable(table);
> win.show(argc,argv);
> Fl::run();
> // the previous window remains on the screen ... why? <-----------
Because Fl::run() will not return while any window is displayed.
So until you close the window, the fltk processing loop will be active and
Fl::run() will not return to your main loop.
> sleep(5);
> }
> }
>
> When I click on the x button of the window the main loop terminates but the
> window disappears.
> How can I changes this ?
What effect do you want to attain?
Are you trying to display a window for 5 seconds then close it?
I suspect you'll need to read up on Fl::add_timeout() if that's the case...
_______________________________________________
fltk-dev mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-dev