[wx-dev] wxApp::OnExceptionInMainLoop() and modal dialogs.
Christopher Davis
loafier at gmail.com
Wed Jul 30 03:09:26 PDT 2008
Hello,
When wxApp::OnExceptionInMainLoop() handles an uncaught exception
from an event handler while a modal dialog is open, is it (or should
it be) possible to shut down only the dialog's event loop and not the
application's primary mainloop by returning false from
wxApp::OnExceptionInMainLoop()?
I've run into an issue experimenting with wxGTK, and it's perhaps
different for other platforms, but when returning false from
wxApp::OnExceptionInMainLoop() while a modal dialog is open causes
both the dialog's event loop and the mainloop to be terminated.
The issue is that wxDialog::EndModal() doesn't check to see if the
main loop was terminated externally, calling gtk_main_quit() in every
case. So, gtk_main_quit() is called twice, once due to the unhandled
exception, and again in wxDialog::EndModal() when the dialog is
destroyed.
Is this the intended behavior or a bug?
Thanks,
--
Christopher Davis
More information about the wx-dev
mailing list