[ wxwindows-Bugs-1486756 ] XRCCTRL failed on wxMenuBar XML Resources

SourceForge.net noreply at sourceforge.net
Sun Jun 17 11:08:58 PDT 2007


Bugs item #1486756, was opened at 2006-05-11 20:14
Message generated for change (Settings changed) made by vaclavslavik
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1486756&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: XML resources
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Martin Y. Chiu (sothatc)
>Assigned to: Nobody/Anonymous (nobody)
Summary: XRCCTRL failed on wxMenuBar XML Resources

Initial Comment:
   Follow the document of "XML-based resource system
overview" to build my system. With the method it
provide at last section "C++ header file generation", I
generated a xrc file from wxGlade, transform the XRC
file to a c++ header resource.h with wxrc.

  However, the program will failed due to XRCCTRL

#define XRCCTRL(window, id, type) \
    (wxStaticCast((window).FindWindow(XRCID(id)), type))

  The FindWidnow(XRCID(id)) will failed on wxMenuBar
because their is no method on wxMenuBar to set ID and 
wxMenuBarXmlHandler didn't set it and store in the
internal lookup table XRCID_Records[].

* Work around

  Modify wxMenuBarXmlHandler and add
  menubar->SetId(GetID());
    in
  wxObject *wxMenuBarXmlHandler::DoCreateResource()

* Fix
  wxMenuBar may need an interface to indicate it's Id and 
wxMenuBarXmlHandler should set the Id as other method.



   

----------------------------------------------------------------------

>Comment By: Vaclav Slavik (vaclavslavik)
Date: 2007-06-17 20:08

Message:
Logged In: YES 
user_id=80834
Originator: NO

I don't know, is it safe to change the ID after creation?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1486756&group_id=9863




More information about the wx-dev mailing list