Load_panel_subclass help

Hi all,
i’m having several problems using ‘load_panel_subclass’ function.

The way i suppose to use it is in main_frame.rb on attached file but i
get
an arror.

could somebody tell me how to use it?

I’m working on win xp sp2 ruby 1.8.6 patchlevel 111 wxruby 1.9.8
wx_sugar
0.1.20

thank you all.

Fabio.

Fabio P. wrote:

i’m having several problems using ‘load_panel_subclass’ function.

The way i suppose to use it is in main_frame.rb on attached file but i
get an arror.

could somebody tell me how to use it?

You don’t need to use load_panel_subclass here at all - calling it is an
error. The ‘CONTATTI’ panel is already part of the overall layout of the
frame and so is loaded anyway when the whole frame is loaded.

load_panel_subclass is only used for when you have a top-level panel
(ie, no parent) defined in your XRC file, and want to load that panel as
the child of an arbitrary window.

hth
alex

Thank you Alex,

the problem is related on code organization:

The xrc file consist of 1 frame and, inside it, a notebook with 2
folders
(panels).
Conceptually they are separated objects with their own code and logic.

What i need is to separate these entities into their own class for
better
code organization avoiding to encapsulate them into a external custom
proxy
class: that’s the reason i used ‘load_panel_subclass’.

cheers

fabio.