Re: wxEuphoria no event triggered

new topic     » goto parent     » topic index » view thread      » older message » newer message

Greg Haberek wrote:
> 
> jacques deschĂȘnes wrote:
> > 
> > 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.
> 
> Ah yes, the "this isn't that" paradigm. wxEuphoria has lead me down that road
> many, many times. I'm used to the Win32Lib mindset where each control gets
> its own events and "pSelf" is what had assigned in setHandler().

Yeah, the event handling is a little different.  It should be whatever was
the first parameter in the call to set_event_handler.  So generally, you can
have a control handle its own events, or allow its parent to do that.  

It all makes more sense in an OO environment (which wxWidgets is).  Also,
I've tried to make as many things as possible work similarly to win32lib,
but of course, not every peg manages to fit that round hole, which can lead
to some confusion.  But I think that overall, it's better to be similar,
because it generally leads to a less steep learning curve.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu