[wxruby-users] load_panel_subclass help

Fabio Petrucci fabio.petrucci at gmail.com
Tue Sep 16 09:13:48 EDT 2008


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.

On Tue, Sep 16, 2008 at 2:28 PM, Alex Fenton <alex at pressure.to> wrote:

> Fabio Petrucci 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
> _______________________________________________
> wxruby-users mailing list
> wxruby-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wxruby-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20080916/b3d8f447/attachment.html>


More information about the wxruby-users mailing list