mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-03-16 21:50:07 +01:00
Add DestroyLater
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@73556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -169,6 +169,20 @@ def run():
|
||||
return not wx.siplib.isdeleted(self)
|
||||
""")
|
||||
c.addPyCode('Window.__bool__ = Window.__nonzero__') # For Python 3
|
||||
|
||||
|
||||
c.addPyMethod('DestroyLater', '(self)',
|
||||
doc="""\
|
||||
Schedules the window to be destroyed in the near future.
|
||||
|
||||
This should be used whenever Destroy could happen too soon, such
|
||||
as when there may still be events for this window or its children
|
||||
waiting in the event queue.
|
||||
""",
|
||||
body="""\
|
||||
self.Hide()
|
||||
wx.GetApp().ScheduleForDestruction(self)
|
||||
""")
|
||||
|
||||
|
||||
# MSW only. Do we want them wrapped?
|
||||
|
||||
Reference in New Issue
Block a user