Xrc panels using xrcise

Hi all,
I’m facing a problem generating base classes using xrcise.

i’ve this xrc layout:

<?xml version="1.0" encoding="UTF-8"?> wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxCLOSE_BOX|wxFULL_REPAINT_ON_RESIZE
    <size>300,400</size>
    <title>wxnc</title>
    <object class="wxMenuBar" name="ID_MENUBAR">
        <object class="wxMenu">
            <label>File</label>
            <object class="wxMenuItem" name="ID_CONNETTI_MENU_ITEM">
                <label>Connetti</label>
            </object>
            <object class="separator">
            </object>
            <object class="wxMenuItem" name="wxID_EXIT">
                <label>Esci</label>
            </object>
        </object>
    </object>
    <object class="wxNotebook" name="ID_NOTEBOOK" 

subclass=“notebook”>
wxRAISED_BORDER

Contatti

wxSUNKEN_BORDER|wxTAB_TRAVERSAL



Configurazione

wxSUNKEN_BORDER|wxTAB_TRAVERSAL




…as the xrcise
tutorialhttp://wxruby.rubyforge.org/wiki/wiki.pl?UsingXRCisesay:

" Note that whereas the “Class” field of top-level Frames, Dialogs and
Panels will become Ruby classes, for the controls within a container,
the
“Class” field is the name of a Ruby module used to extend the
control."

but no classes are generated for the two panels inside wxNotebook
(contatti
and config)

Is there any options to force panel class generation?

My platform is ubuntu 7.x - Ruby 1.8.5 - wxruby 1.9.7 - wx_sugar 0.1.20

thank you.

f.

Hi Fabio

Fabio P. wrote:

container, the “Class” field is the name of a Ruby module used to
extend the control."

but no classes are generated for the two panels inside wxNotebook
(contatti and config)

Is there any options to force panel class generation?

It doesn’t really work this way. The class always corresponds to a
top-level element in the XRC - in this case, your frame. This limitation
comes from WxWidgets. This base class is generated by XRCise.

To link ruby code behaviours to contained elements - like your panels -
you write a ruby a module with the same name as the ‘subclass’ attribute
in the XRC. Then, when the whole layout is loaded from XRC, the elements
will be extend-ed with that module.

hth
alex