Re: wxEuphoria events don't work
- Posted by Jerry_Story May 22, 2009
- 839 views
ghaberek said...
Jerry_Story said...
I have something set up wrong. But I don't have a clue what. All the events fail to work and all used to work. Here is a small example.
procedure onClick_btnCheck1(atom this, atom event_type, atom id, atom event) check1() shade_check1() end procedure set_event_handler( btnCheck1, get_id(btnCheck1),wxEVT_COMMAND_BUTTON_CLICKED,routine_id( "onClick_btnCheck1" ))
This used to work. Now it doesn't work. I don't have a clue why.
This works for me...
include wxeud.e without warning object void constant frmMain = create( wxFrame, {0, -1, "Test"} ) constant pnlMain = create( wxPanel, {frmMain} ) constant btnCheck1 = create( wxButton, {pnlMain, -1, "Check", 10, 10, 90, 30} ) procedure btnCheck1_onClick(atom this, atom event_type, atom id, atom event) void = message_box( "Clicked!", "Test", wxICON_INFORMATION ) end procedure set_event_handler( btnCheck1, -1, wxEVT_COMMAND_BUTTON_CLICKED, routine_id("btnCheck1_onClick") ) wxMain( frmMain )
-Greg
For me, it makes the window and the button, but nothing happens when I click on the button.