Reading XRC by usin wxPython

Thanks a lot. Here are the two files that can show the problem.

Carolyn

REAL
318 Davenport Hall
607 S. Mathews Av.
Urbana, IL. 61801
Tel. 333-0414

x_sep23.xrc (1.05 KB)

x_sep23.py (1.16 KB)

···

From: Robin Dunn <robin@alldunn.com>
User-Agent: Mozilla Thunderbird 0.8 (X11/20040913)
X-Accept-Language: en-us, en
To: wxPython-users@lists.wxwidgets.org
X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk
X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no
        version=2.63
X-Spam-Hits: -0.0
Subject: Re: [wxPython-users] Reading XRC by usin wxPython

Carolyn D. Guo wrote:

Hi,
I have a problem when reading the XRC code generated from wxGlade.
There is always a warning coming out showing that "XRC resource '
frame_1_menuba'(class wxMenubar) not found". When looking at the
detail, it says that Subclass 'MyFrame' not found for resource
'frame_1', not subclassing!. This will result in the menu not showing
in the frame. I feel it is something wrong with the subclass
"MyFrame", but when deleting it, the whole frame will not show.
So can some one tell me what is wrong with it?

Plese send a small as possible xrc and py app that shows the problem.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

Carolyn D. Guo wrote:

From: Robin Dunn <robin@alldunn.com>

Carolyn D. Guo wrote:

Hi,
I have a problem when reading the XRC code generated from wxGlade.
There is always a warning coming out showing that "XRC resource ' frame_1_menuba'(class wxMenubar) not found". When looking at the detail, it says that Subclass 'MyFrame' not found for resource 'frame_1', not subclassing!. This will result in the menu not showing in the frame. I feel it is something wrong with the subclass "MyFrame", but when deleting it, the whole frame will not show.
So can some one tell me what is wrong with it?

Plese send a small as possible xrc and py app that shows the problem.

> Thanks a lot. Here are the two files that can show the problem.

Since the menubar is embedded inside the frame in the XRC it is not found with LoadMenuBar (only top-level <object>'s can be Loaded.) But also since the menubar is embedded then it will be build and added to the frame automatically. You can just comment out the call to InitMenu in your sample to see it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!