[wxruby-users] xml.load_panel
Alex Fenton
alex at pressure.to
Tue Aug 26 09:41:54 EDT 2008
Max Salov wrote:
> If I load panel directly from xrc-file, everything is ok, but if I
> create a class
>
> class NewPanel < Wx::Panel
> def initialize parent = nil
> super
>
Here, you must call super() - with no arguments. Whenever you're loading
an XRC layout into a Frame/Panel/Dialog subclass you must call the
default initialize with no arguments, then call load_xxx_subclass with
the usual arguments.
> $xml.load_panel_subclass(self,parent,'PANEL')
> end
> end
>
cheers
aelx
More information about the wxruby-users
mailing list