User forums > Help

wxSmith adds the event handler, but the connection is lost immediately

(1/1)

ollydbg:
I see some strange issue about using wxSmith to add some event handler.

Suppose I have a wxButton on the GUI designer, and when I go to the left navigation panel of the wxSmith, to add a new event handler.

It looks like the event handler function is added to the associated header files and implementation file, that's good, but I soon noticed that the connection between the gui control and the event handler is lost.

What I need to do is the use the mouse to click on other wxSmith control again, and click back on the previous control again, and in the wxSmith's Events panel, I have to open the list box of the event functions, and select the one I recently added. By doing this, the actual connection between the gui control and event handler is generated, and I see there is a function call statement like:


--- Code: ---Connect(ID_CHECKBOX1, wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction)&MyDialog::OnCheckBoxClick);

--- End code ---

is added.

My question is: do you see the same issue here? I mean why I need some extra steps to bind the control and event handler? It should bind in the first step when I add the event handler.

Thanks.

Navigation

[0] Message Index

Go to full version