ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> wxPython-users
wxPython-users
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"&gt;
>              <orient>wxVERTICAL</orient>
>              <object class="sizeritem"&gt;
>                  <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


Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved