Based on the source code, I believe that it will be so.
Source code: http://wxwidgets2.8.sourcearchive.com/documentation/2.8.7.1/classxrc_1_1XmlResource_4a0466d7ef7ac98ef7a9b8135a0c9339.html
def AddSubclassFactory(*args, **kwargs): """AddSubclassFactory(XmlSubclassFactory factory)""" return _xrc.XmlResource_AddSubclassFactory(*args, **kwargs)
So you can see that it is looking for an object of type XmlSubclassFactory. From the documentation (http://wxpython.org/docs/api/wx.xrc.XmlSubclassFactory-class.html) we find ...
XmlSubclassFactory __init__(self)
We see that the constructor for XmlSubClassFactory takes no arguments. Therefore, we create an XmlSubclassFactory object and create a resource to add SubClassFactory to.
import wx from wx import xrc scf = xrc.XmlSubClassFactory() resource = xrc.XmlResource("resource.xrc") resource.AddSubclassFactory(scf)
Unfortunately, I could not find a Python example. However, I think the Perl analogue is pretty close. From http://permalink.gmane.org/gmane.comp.lang.perl.wxperl/477
Wx::XmlResource::AddSubclassFactory( MyFactory->new );
This is very similar to what we are doing. So, between reading the source code and this example, I think the snippet is a good place to start. Good luck
source share