Changed wxSWIG to not generate Python code using apply, (since it will
be deprecated in the future) wxSWIG will use spam(*args, **kw) syntax instead. Also changed the generated __repr__ methods to be a bit more informative. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19911 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -732,7 +732,7 @@ def wxCallAfter(callable, *args, **kw):
|
||||
if _wxCallAfterId is None:
|
||||
_wxCallAfterId = wxNewEventType()
|
||||
app.Connect(-1, -1, _wxCallAfterId,
|
||||
lambda event: apply(event.callable, event.args, event.kw) )
|
||||
lambda event: event.callable(*event.args, **event.kw) )
|
||||
evt = wxPyEvent()
|
||||
evt.SetEventType(_wxCallAfterId)
|
||||
evt.callable = callable
|
||||
@@ -904,7 +904,7 @@ class wxPyWidgetTester(wxApp):
|
||||
return True
|
||||
|
||||
def SetWidget(self, widgetClass, *args):
|
||||
w = apply(widgetClass, (self.frame,) + args)
|
||||
w = widgetClass(self.frame, *args)
|
||||
self.frame.Show(True)
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user