Re: wxEuphoria - get_facenames() issue
- Posted by Matt Lewis <matthewwalkerlewis at gma?l?com> Feb 06, 2008
- 677 views
Greg Haberek wrote: > > Matt Lewis wrote: > > > > I've fought this issue many times, and I think now I have the best solution. > > Part of the problem is that I have to take whatever I'm handed by wxWidgets, > > I got it to work. But... why do the docs say this method is depreciated, when > it's the only thing that works? > > }}} <eucode> > set_event_handler( {frmMain,mnuFile}, -1, wxEVT_COMMAND_MENU_SELECTED, > routine_id("menus_onClick") ) > </eucode> {{{ If you take a look at set_event_handler in wxeud.e, you'll see that it now discards the frmMain, and just uses mnuFile (which is the documented way to do it). > Also, could you make it so that we can pass multiple menus to the event > handler? > Something like this would work well: > > }}} <eucode> > set_event_handler( {frmMain,mnuFile,mnuEdit,mnuView,mnuHelp}, -1, > wxEVT_COMMAND_MENU_SELECTED, routine_id("menus_onClick") > ) > </eucode> {{{ This is a possibility. Basically, it would just be a for loop in set_event_handler. The only issue is that there is likely code out there that still uses the deprecated way of doing it, so we'd start breaking things. Maybe for the next release. In the mean time, you could always wrap it to do that yourself. Or maybe add a new function (set_handler). That way new code could take advantage without worrying about breaking old code. Matt