I hope I'm not being annoying or something by reviving this thread. (If this isn't the place for it please point me in the right direction)
I get this problem when opening a resource inside wxSmith:
Only wxMenu items can be added into wxMenuBar
Well, it never used to show this error before and it worked correctly
So I deleted the menu and created a new one inside wxSmith menu editor,
but apparently wxSmith does the same thing.
Hmm, I must have missed something. Could you send the wxMenu part from wxs / xrc ?
I have been having this same issue as well (tested both r4351 and r4751, in that order). It seems that creating the menubars (from scratch!) goes very well in wxSmith. Saving them also yields proper XRC files.
When loading these same XRC files I get the same error as Russel though. This error message seems to be produced in this function (src/plugins/contrib/wxSmith/wxwidgets/defitems/wxsmenubar.cpp):
bool wxsMenuBar::OnCanAddChild(wxsItem* Item,bool ShowMessage)
.
When adding some debug code at that place to find out the value of "Item->GetInfo().ClassName" I find out that it somehow thinks the ClassName to be "Custom". Now I wouldn't know where it gets that from, but definitly not from the XRC files (yes I searched them for it, just to be sure). So I'm thinking that somehow something goes wrong in the XML parser or the code that gets invoked by it.
Anyway, attached I've got two XRC files which both fail to open properly. One of them (_mainframe.xrc) is a stripped down XRC file of a window for an open source project I'm working on (map editor for open source game
Warzone 2100). The other (menutest.xrc) is a minimal test case which yields the same result.
PS: I had to rename them to have a .txt extension since apparently this board doesn't like .xrc extensions.
[attachment deleted by admin]