>
> On Sep 20, 2007, at 5:11 PM, Stan wrote:
>
> >    void do_exit()
> >    {
> >         // What is the condition of 'this' here?
> >         // Has it been deleted?  Does it matter if
> >         // we got here because the user pressed the 'x'
> >         // on the window border?
> >    }
>
> No, there is no special processing here. This is just a regular
> callback which happens to default to hiding the window, so a rapidly
> prototyped application can exit by clicking the "Close" button or by
> pressing ESC.
>
> If you simply return, nothing will happen.
>
> Do not delete the widget in a callback. If you must delete a widget
> in a callback, use Fl::delete_widget(self) instead.
>
> If you want to quit the application, you can either simply call exit
> () or _exit() from within the callback, and C++ together with the OS
> will release all of you standard resources.
>
> If you want to quit your app by leaving the "run()" loop, you can
> hide all windows, and Fl::run() will return control. To find all
> windows, use Fl::first_window and Fl::next_window
>
> Matthias


Thanks Matt, but I was asking a slightly different question.
I'm trying to find out if it's possible that by the time my
app is executing the callback code the window has already been
deleted (by fltk).  If it was the last visible window, for
instance.  I think the answer is "no, that's not
possible"  (in fact, I think I've just about figured out what
my problem really is, and it's elsewhere); this is just sort
of a sanity check.

Thanks again,
Stan
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to