Hello,

Is it possible to subclass some empty classes like Wx::TextAttr?

I would like to use a standard perlish design and access everything with 
objects.

I can use:

my $style = Wx::TextAttr->new;

But I couldn't create a module that subclasses Wx::TextAttr because it told me 
that this class is empty if I done:

package Style;
use base 'Wx::TextAttr';

I have also tried to use Wx:

package Style;
use Wx;
use base 'Wx::TextAttr';

In this case it doesn't tell that Wx::TextAttr is empty, but if I add a certain 
method in this package, that method can't be used because it gives the error 
telling that there is no such a method defined in Wx::TextAttr.

I have even tried to define that method as:

sub Wx::TextAttr::method_name {}

but this crashed the Perl interpreter.

Thanks.

Octavian

Reply via email to