Pertinent (I think) snippets of my code follow:
class MyFrame(wxFrame):
def __init__(self, parent, id, title):
#Call the base class to do the real work
wxFrame.__init__(self, parent, id, title,
wxDefaultPosition,wxSize(400, 400))
[...]
self.diagTB = self.CreateToolBar(wxTB_HORIZONTAL)
self.diagTB.AddTool(97, wxBitmap("images/select.bmp",
wxBITMAP_TYPE_BMP), isToggle = true, shortHelpString = "Select",
longHelpString = "Select
and manipulate objects")
self.diagTB.AddTool(99, wxBitmap("images/q.bmp",
wxBITMAP_TYPE_BMP), isToggle = true, shortHelpString = "Question object",
longHelpString = "Add question objects to diagram")
[...]
EVT_TOOL_RANGE(self, 97, 105, self.OnDiagToolClick)
self.diagTB.ToggleTool(97, true)
self.diagTB.Realize()
def OnDiagToolClick(self, event):
id = event.GetID()
And when the above line is executed, I get the following:
Traceback (most recent call last):
File "dbadmin.py", line 276, in OnDiagToolClick
id = event.GetID()
AttributeError: 'wxCommandEventPtr' instance has no attribute 'GetID'
What is it that I am doing wrong?
Thanks for your time.
Alexander