mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 12:00:13 +01:00
Set mustHaveApp for all window classes
This commit is contained in:
@@ -230,6 +230,10 @@ def fixWindowClass(klass, hideVirtuals=True, ignoreProtected=True):
|
||||
"""
|
||||
Do common tweaks for a window class.
|
||||
"""
|
||||
# NOTE: it may be okay to just do this for top-level windows
|
||||
# TODO: look into that possibility
|
||||
klass.mustHaveApp()
|
||||
|
||||
# The ctor and Create method transfer ownership of the this pointer to the parent
|
||||
for func in klass.findAll(klass.name) + klass.findAll('Create'):
|
||||
if isinstance(func, extractors.MethodDef):
|
||||
@@ -269,6 +273,8 @@ def fixTopLevelWindowClass(klass, hideVirtuals=True, ignoreProtected=True):
|
||||
"""
|
||||
Tweaks for TLWs
|
||||
"""
|
||||
klass.mustHaveApp()
|
||||
|
||||
# TLW tweaks are a little different. We use the function annotation for
|
||||
# TransferThis instead of the argument annotation.
|
||||
klass.find(klass.name).findOverload('parent').transfer = True
|
||||
|
||||
Reference in New Issue
Block a user