Re: wxEuphoria no event triggered
- Posted by jacques deschênes <desja at globetrotte?.n?t> Jan 24, 2008
- 531 views
Matt Lewis wrote: > > Greg Haberek wrote: > > > > jacques deschênes wrote: > > > > > > What's wrong with the following code. When I click buttons no event > > > handler > > > is called. > > > > > (snip) > > > So it looks like you need to do this: > > > }}} <eucode> > set_event_handler( Button, get_id(Button), wxEVT_COMMAND_BUTTON_CLICKED, > routine_id("event_handler")) > </eucode> {{{ > > Greg is correct. Events don't propagate up to a dialog, so you need to > use the control itself as the event handler. > > Matt That wright. It's what I did at first, but it was apparently not working. The error was in the event handler itself. I was calling end_dialog() with the this parameter which is not the dialog but the button. So the dialog was nerver closing. From there I wrongly concluded that event handler was not called. I should had trace my code before going to wrong conclusion. thanks both of you for your answer. regards, Jacques Deschênes