in reply to wxperl subclassing Wx::VListBox

Firstly, the demo code appears to derive from a class called Wx::PlVListBox rather than Wx::VListBox, so I'm not sure which of the two I should be using?
As you found out from demo/testing, you should be using Wx::PLVListBox :) Wx::NewClass explains the reason
For abstract classes, XS++ will create an additional Perl-level class, called  Wx::Pl<classname>; in order to override the virtual methods, you must derive from this class, and not from  Wx::<classname>.
but I'm not sure how I go about adding additional attributes given I have no knowledge of how the underlying object is stored?
If you add use DDS; Dump($vlistbox); you might see (what I see) $Wx_VListBox1 = bless( \do { my $v = 14356976 }, 'Wx::VListBox' );, so you can't add attributes to it.

I'm not sure if this is intended or desireable :)

Replies are listed 'Best First'.
Re^2: wxperl subclassing Wx::VListBox
by antmico (Novice) on Feb 12, 2011 at 13:11 UTC
    Many thanks for the clarification.