X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/07acc3cc570b75b625234225bf2e3b3be2ad3a97..da2f117200f2933478d571d2d9e6d636dbbd0e4c:/src/xrc/xh_menu.cpp?ds=sidebyside diff --git a/src/xrc/xh_menu.cpp b/src/xrc/xh_menu.cpp index f836539c69..275c78aa62 100644 --- a/src/xrc/xh_menu.cpp +++ b/src/xrc/xh_menu.cpp @@ -21,6 +21,7 @@ #ifndef WX_PRECOMP #include "wx/frame.h" + #include "wx/log.h" #include "wx/menu.h" #endif @@ -90,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; @@ -145,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