Steve Cookson wrote:
Hi,
There is a partial guide in lib/Wx/NewClass.pod (waiting for your
feedback to be improved ;-)
Well first of all, after having put this off for a long time, I've taken the
plunge. So I'm starting to give this NewClass.pod some attention by trying
to wrap wxRichTextPrintout. After not understanding that it was all in POD,
it was much easier than I anticipated.
Here are my thoughts so far:
1) For new users (like me) some indication that I should use a pod-reader (I
used pod2html) to read this file and that the code is in C++ (if it is) and
what sort of editor and compiler I would need (if I need one). I'm going to
try to use a native Kubuntu text editor (kate), so I'll let you know if it
works.
I thought the .pod extension was a good enough clue...
2) CONSTANTS is misspelled in :
see L</"COSTANTS"> and L</"EVENTS">.
3) Also links generated by pod2html don't take you anywhere for:
see L</"COSTANTS"> and L</"EVENTS">.
see L</"OVERLOADING">.
see L</"VIRTUAL METHODS">.
I guess maybe you planned to write these sections, but didn't get round to
it.
Correct. I have some ExtUtils::XSpp changes that simplify writing
the code to wrap these features.
4) Something about how the directory structure is set up and what directory
to put the xsp file in would be nice. Eg "Take a copy of the SVN download
directory as a starting point and look for or create an appropriate
directory" (in this case ext/richtext/XS)
Added this.
If adding a class related to one of the wxPerl submodules
(C<Wx::RichText>, C<Wx::Html>, ...) add the F<.xsp> file to the
relevant subdirectory and modify the F<.xs> and F<typemap> files in
that subdirectory.
Finally, I couldn't see and entry in typemap.tmpl for RichTextPrinting to
copy for RichTextPrintout. Does it not need to be there?
For the subdirectories there is only the typemap file.
So now the only thing I haven't finished is the VIRTUAL METHODS. Any clues
on this and any comments on what I've done so far would be welcome (in the
interim I'm going to use the definition without the word 'virtual' which is
how it seems to be for wxPrint. Does there need to be some sort of stub to
stop the compiler from crashing?).
The latest ExtUtils::XSpp version should parse and ignore them, so
you can leave there the "virtual" keyword. As for actually writing the
code to handle virtual methods, it is better if you wait after I release
some XS++ changes; I'll keep you posted.
Regards,
Mattia