Parameters for creating a new menuitem:
To set up event handlers for menus, use the wxEVT_COMMAND_MENU_SELECTED event type. wxMenu controls now derive from wxEvtHandler, so you should set events with the menu now, not a parent control.
ex:
procedure on_open_menu( atom this, atom event )
-- do stuff
end procedure
-- if you used a specific wxID_ constant when you created the wxMenuItem, you could
-- use that instead of get_menuitem_id: wxID_OPEN, wxID_NEW, etc
set_event_handler( the_open_menu_parent, get_menuitem_id( the_open_menu ),
wxEVT_COMMAND_MENU_SELECTED, routine_id("on_open_menu"))