Hi,
I have subclass of a wx.Frame called ListControl.
I wanted to add copy (from copy-and-paste) capabilities to ListControl class.
I changed the header of this class to be:
class ListControl(wx.Frame, CopyAndPaste):
where CopyAndPaste is attached.
However, trying to run now - the script gives me the following exception:
$ python -u ./failover_pickle_demo09.py
Traceback (most recent call last):
File “./failover_pickle_demo09.py”, line 325, in
class ListControl(wx.Frame, CopyAndPaste):
TypeError: Error when calling the metaclass bases
metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
I tried to read the (black magic? material on the web on metaclasses, but my knowledge of Python/wxPython is obviously too limited to understand how metaclasses come into play here, and what the solution should be…
Could anyone point me in the right direction ?
Thanks,
Ron.
CopyAndPaste.py (3.9 KB)