Changed call order of the PreCreate method, and pass the pre instance

to it.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-06-27 22:36:24 +00:00
parent 3ad84671d3
commit cf952100f3

View File

@@ -56,7 +56,7 @@ def get_resources():
CLASS_HEADER = """\ CLASS_HEADER = """\
class xrc%(windowName)s(wx.%(windowClass)s): class xrc%(windowName)s(wx.%(windowClass)s):
def PreCreate(self): def PreCreate(self, pre):
\"\"\" This function is called during the class's initialization. \"\"\" This function is called during the class's initialization.
Override it for custom setup before the window is created usually to Override it for custom setup before the window is created usually to
@@ -66,8 +66,8 @@ class xrc%(windowName)s(wx.%(windowClass)s):
def __init__(self, parent): def __init__(self, parent):
# Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation) # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation)
pre = wx.Pre%(windowClass)s() pre = wx.Pre%(windowClass)s()
self.PreCreate(pre)
get_resources().LoadOn%(windowClass)s(pre, parent, "%(windowName)s") get_resources().LoadOn%(windowClass)s(pre, parent, "%(windowName)s")
self.PreCreate()
self.PostCreate(pre) self.PostCreate(pre)
# Define variables for the controls # Define variables for the controls