When I run this code:
import wx
ID_FILE_QUIT = 101
class MainFrame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, wx.ID_ANY, title=title)
self.menuBar = wx.MenuBar()
self.fileMenu = wx.Menu()
self.fileMenu.Append(1, '&Quit\tCtrl+Q')
self.Bind(wx.EVT_MENU, self.Close(), id=ID_FILE_QUIT)
self.menuBar.Append(self.fileMenu, '&File')
self.SetMenuBar(self.menuBar)
self.Show()
app = wx.App()
frame = MainFrame('Ya Mum')
app.MainLoop()
I get some error about expecting a callable object for self.Bind()?
Can someone tell me why this is happening?