Newbie question re:wxMenuBar events

These don’t look right to me, specifically, the “id=-1”. When I bind my menu events, I use the ID of the specific menu option.

I’ve never used Glade, so I can’t recommend what you would do to make it behave, but if I were writing this code by hand, each item would look more like:

ID_BUY = wx.NewId()

wxglade_tmp_menu.Append(ID_BUY, “Buy CW”, “”, wx.ITEM_NORMAL)
self.Bind(wx.EVT_MENU, self.buy_license, id=ID_BUY)
(etc)

HTH,

Gre7g

···

On 5/7/08, Randy Rue randyrue@gmail.com wrote:

self.Bind(wx.EVT_MENU, self.close_cw, id=-1)