From c655b0901208802716f7400df306381ba8ff27f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Colomb?= Date: Mon, 5 Feb 2018 09:35:05 +0100 Subject: [PATCH] Remove obsolete argument from PreCreate(). With the `pre` object magic gone, there is no need to pass another argument to the PreCreate() method, which can now just use `self`. Note that this is will probably lead to incompatibilities for users of the generated class who override this method, as advised in the template. --- wx/tools/pywxrc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wx/tools/pywxrc.py b/wx/tools/pywxrc.py index cec19a63..c1b3d2da 100644 --- a/wx/tools/pywxrc.py +++ b/wx/tools/pywxrc.py @@ -62,7 +62,7 @@ def get_resources(): CLASS_HEADER = """\ class xrc%(windowName)s(wx.%(windowClass)s): #!XRCED:begin-block:xrc%(windowName)s.PreCreate - def PreCreate(self, pre): + def PreCreate(self): \"\"\" This function is called during the class's initialization. Override it for custom setup before the window is created usually to @@ -75,7 +75,7 @@ class xrc%(windowName)s(wx.%(windowClass)s): def __init__(self, parent): # Two stage creation (see http://wiki.wxpython.org/index.cgi/TwoStageCreation) wx.%(windowClass)s.__init__(self) - self.PreCreate(self) + self.PreCreate() get_resources().Load%(windowClass)s(self, parent, "%(windowName)s") # Define variables for the controls, bind event handlers