Re: Force destroying dialogs
"'Pyfips' via wxPython-users" <[email protected]>
| Newsgroups | gmane.comp.python.wxpython |
|---|---|
| Message-ID | <[email protected]> |
Thank you both for you answers, @Tim I have tried wx.GetApp().Yield() and wx.GetApp().ProcessPendingEvents() before and after calling <dialog>.Destroy() as well gc.collect(). That did not make any difference, there are still a lot of user objects and GDI handles used when watching the task in ProcessExplorer. When calling wx.GetApp().MainLoop() then some tests do not end (this may be a problem of the tests since the mainloop should end automatically if all dialogs are destroyed if I have read it correctly). When calling <dlg>.DestroyChildren() tehere are only 1/4th of the GDI objects and user objects at the end of the test run. @Robin Thanks for the example. Currently, I just use wx.GetApp().Yield() which works fine for processing the events. Are there advantages in using a temporary event loop? By the way, the error message I am receiving is this one: wx._core.wxAssertionError: C++ assertion "Assert failure" failed at ..\..\src\msw\toplevel.cpp(495) in wxTopLevelWindowMSW::CreateDialog(): Failed to create dialog. Incorrect DLGTEMPLATE? -- You received this message because you are subscribed to the Google Groups "wxPython-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/wxpython-users/b456287b-d6f0-4984-90e8-114aa9e7d7bf%40googlegroups.com.