Re: Switch Bug
- Posted by Jerome Jun 06, 2011
- 1681 views
I'm not sure of the reason but if you define new_id's for the built in wxID_ constants, things work as expected. I tried the following:
wxID_CUSTOM1 = new_id(), wxID_NEW = new_id(), wxID_OPEN = new_id(), wxID_SAVE = new_id(), wxID_SAVEAS = new_id(), wxID_PRINT_SETUP = new_id(), wxID_PRINT = new_id(), wxID_EXIT = new_id(), ......
Also, probably not necessary but I passed in the Menu id's to the set_event_handler...
constant menuids = {wxID_NEW,wxID_OPEN,wxID_SAVE,wxID_SAVEAS,wxID_PRINT_SETUP,wxID_PRINT,wxID_CUSTOM1,wxID_EXIT} set_event_handler( mnuFile, menuids, wxEVT_COMMAND_MENU_SELECTED, routine_id("menu_handler") )
It sorta defeats the purpose of using the built in id's, but it seems to work!
Hope this helps,
Ira