Hello,
I've got a problem regarding closing of frames and appliation too.
Attached to this mail you'll find a small sample application to
reproduce the situation.
My application creates a number of frames (from xml). When a frame gets
closed it will be hidden only so the app can show it later again (if
needed). If the last frame has been hidden the application destroys all
frames and so quits. This works fine until the question dialog appears.
Ok, when a frame gets hidden the app checks if there are pending
(unsaved) changes. If so, a dialog appears asking wether they should be
saved or not. After this dialog has been answered, the frame hides (and
it gets destroyed) but the main loop will *not* be stopped. If there is
no such dialog (in our sample-code the text-entry is empty) the main
loop gets terminated as expected.
The sample application is quite simple. If the text-entry widget is
left empty, the frame is "clean", which means no dialog will appear on
closing the frame (either by menu or via X-button). If the text-entry
widget is not empty, the dialog appears and the appication's main loop
won't get terminated after closing the frame.
If we uncomment the line "event.GetEventObject().Show()" in the method
"OnCloseWindow", the main loop terminates as expected even if a dialog
apears.
Why do I need to add that Show() ? Does it make sense, or is it a bug?
Thanks for your help,
Johannes
closing.py (3.69 KB)
···
--
BYTEWISE Software GmbH Tel +43 (5577) 89877-0
i.A. Johannes Vetter Fax +43 (5577) 89877-66
A-6890 Lustenau, Enga 2 http://www.bytewise.at
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wir bieten Installation und Support für Ubuntu: ein auf
GNU/Linux basierendes Softwaresystem für Arbeitsplatzrechner