X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/125c2fccdc3a87377ae64e0153bf46d839fc2f93..cd15bcaf50ead53ccf9d50965312f0dc754affb4:/samples/xrc/objrefdlg.cpp diff --git a/samples/xrc/objrefdlg.cpp b/samples/xrc/objrefdlg.cpp index 8d91b64601..0b0b625ece 100644 --- a/samples/xrc/objrefdlg.cpp +++ b/samples/xrc/objrefdlg.cpp @@ -49,7 +49,7 @@ ObjrefDialog::ObjrefDialog(wxWindow* parent) wxCHECK_RET(nb, "failed to find objref_notebook"); // Connect different event handlers. - nb->Connect(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, + nb->Connect(wxEVT_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler(ObjrefDialog::OnNotebookPageChanged), NULL, this); @@ -74,11 +74,11 @@ ObjrefDialog::ObjrefDialog(wxWindow* parent) // Connect the id ranges, using the [start] and [end] 'typedefs' page = nb->GetPage(calc_page); page->Connect(XRCID("digits[start]"), XRCID("digits[end]"), - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(ObjrefDialog::OnNumeralClick), NULL, this); page->Connect(XRCID("operators[start]"), XRCID("operators[end]"), - wxEVT_COMMAND_BUTTON_CLICKED, + wxEVT_BUTTON, wxCommandEventHandler(ObjrefDialog::OnOperatorClick), NULL, this); @@ -138,8 +138,6 @@ void ObjrefDialog::OnNotebookPageChanged( wxNotebookEvent &event ) ClearCalculator(); break; } - - default: return; } } @@ -255,7 +253,8 @@ void ObjrefDialog::OnOperatorClick(wxCommandEvent& event) { wxLogMessage("You clicked operators[%i], XRCID %d, 'Clear'", ID, event.GetId()); - return ClearCalculator(); + ClearCalculator(); + return; } switch(ID)