Hi,
I have a problem where I'm stuck.
I install a custom XmlHandler for my own ListCtrl derived class.
When loading the resource the correct class is instanciated. However after
that I can't call any additional method in the class. Anything that's not in
the ListCtrl is missing.
Sample is below. If you try to call DoSomething() later on it raises:
exceptions.AttributeError: wxListCtrlPtr instance has no attribute
'DoSomething'
Is it possible to create a derived class with additional methods ?
Some magic must be happening after the Create() method is called, since the
correct Create() is called when creating the instance.
Any ideas ?
---------------------- snip ---------------------
class PreAWListCtrl(wx.ListCtrl, ListCtrlAutoWidthMixin):
def __init__(self):
p = wx.PreListCtrl()
self.this = p.this
def Create(self, parent, id, pos, size, style, validator, name):
wx.ListCtrl.Create(self, parent, id, pos,size,style,validator,name)
ListCtrlAutoWidthMixin.__init__(self)
self.Refresh()
def DoSomething(self):
print "Blah Blah"
···
--
UC
--
Open Source Solutions 4U, LLC 2570 Fleetwood Drive
Phone: +1 650 872 2425 San Bruno, CA 94066
Cell: +1 650 302 2405 United States
Fax: +1 650 872 2417