AttributeError: wxMenuItemPtr instance has no attribute 'SetName'
So FindItemById is returning a wxMenuItemPtr not a wxMenuItem. How do I de-reference this pointer. I didn't even realise there were pointers in python that needed dereferencing.
self.fileMenu.SetLable(ID_FILE_CONNECT, "Dis&connect from Database")
I get
AttributeError: wxMenuItemPtr instance has no attribute 'SetName'
So FindItemById is returning a wxMenuItemPtr not a wxMenuItem. How do I
de-reference this pointer. I didn't even realise there were pointers in
python that needed dereferencing.
It's just the way SWIG generates the code. There are two Python classes for
each C++ class. One is for when you create the object from Python, the
other is for when a C++ method returns a C++ pointer to an existing object.
Look in the wxPython/*.py files to see how they relate to each other.
ยทยทยท
--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters? http://wxPython.org Relax with wxPython!