Re: [wxPython-users] wxXmlResource - LoadMenuBar()-Error...
by Robin Dunn other posts by this author
Dec 4 2004 6:16PM messages near this date
[wxPython-users] wxXmlResource - LoadMenuBar()-Error...
|
Re: [wxPython-users] wxXmlResource - LoadMenuBar()-Error...
ich@[...].de wrote:
> Error at this Line:
> self.MenuBar = self.res.LoadMenuBar("frame_1_menubar")
>
> Error Code:
> No handler found for XML node 'object', class 'wxMenuItem'!
This is because the wxMenuBar handler is not able to use a wxMenuItem
direclty, it can only have wxMenu's embedded within it.
> XRC resource 'frame_1_menubar' (class 'wxMenuBar') not found!
This is because you can only load top-level items from the XRC, and
since frame_1_menubar is embedded within the frame it is not seen by the
LoadMenu function. It will, however, be loaded automatically by the
frame when it is loaded from the XRC.
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!-- generated by wxGlade 0.3.5.1 on Sat Dec 04 00:01:17 2004 -->
>
> <resource version="2.3.0.1">
> <object class="wxFrame" name="frame_1" subclass="MyFrame">
> <style>wxDEFAULT_FRAME_STYLE</style>
> <title>frame_1</title>
> <object class="wxBoxSizer">
> <orient>wxVERTICAL</orient>
> <object class="sizeritem">
> <option>1</option>
> <flag>wxEXPAND</flag>
> <object class="wxPanel" name="panel_1">
> <style>wxTAB_TRAVERSAL</style>
> </object>
> </object>
> </object>
> <object class="wxMenuBar" name="frame_1_menubar">
<object class="wxMenu" name="themenu">
<label> TheMenu</label>
> <object class="wxMenuItem" name="item_Name">
> <label>item</label>
> </object>
</object>
> </object>
> </object>
> </resource>
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@[...].org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Thread:
Robin Dunn
|