X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b935c45dee0e6036de3e83c44015d14d3958ac7f..07aaf32633ecf18ec3edfbb41793a112914792d0:/src/xrc/xh_menu.cpp?ds=inline diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index fe700cdd5c..275c78aa62 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -91,9 +91,11 @@ wxObject *wxMenuXmlHandler::DoCreateResource() { if ( kind != wxITEM_NORMAL ) { - wxLogWarning(_("XRC syntax error: a menu item can't have " - "both \"radio\" and \"checkable\" " - "properties, ignoring the former.")); + ReportParamError + ( + "checkable", + "menu item can't have both and properties" + ); } kind = wxITEM_CHECK; @@ -146,7 +148,17 @@ wxMenuBarXmlHandler::wxMenuBarXmlHandler() : wxXmlResourceHandler() wxObject *wxMenuBarXmlHandler::DoCreateResource() { - wxMenuBar *menubar = new wxMenuBar(GetStyle()); + wxMenuBar *menubar = NULL; + + const int style = GetStyle(); + wxASSERT_MSG(!style || !m_instance, + "cannot use