[wxPython] wxMenu question using myEvent

Hi Everybody!

following the example PythonEvents.py for buttons
I wanted to replicate something similar for menus.
(without success at event launch...)
I have some info that depends by the wxMenuItems of a menu
in a wxMenuBar. Selecting an item I need to call a
method that extracts a string from the event
(like myVal of the demo sample).

I wanted to change the wxEvent with my own
but use the normal EVT_MENU() macro

I tried to put the EVT_MENU(...) in my wxMenu.__init(...)
and connecting it to myMenu.OnSelect(...)
I created myEvent with the id wxEVT_COMMAND_MENU_SELECTED

the OnSelect method is never called...
(also tried to subclass wxMenuBar, without success, but this is
too far from the wxMenuItem and the data I need to carry)
where am I wrong?

the only working way seemed to be using the menuItem ID but I was
wondering
about an OO way to do it (like the nice demo). Is it possible?

thanks in advance for reading my question

bye

Gianandrea

ยทยทยท

_______________________________________________
wxPython-users mailing list
wxPython-users@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/wxpython-users