Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re^2: wxPerl fails with a cryptic message: "variable is not of type Wx::Point"

by Anonymous Monk
on Mar 09, 2013 at 12:13 UTC ( #1022561=note: print w/replies, xml ) Need Help??

in reply to Re: wxPerl fails with a cryptic message: "variable is not of type Wx::Point"
in thread wxPerl fails with a cryptic message: "variable is not of type Wx::Point"

some thoughts I wrote down

but these also have the problem of being C++ documentation which will require interpretation.

But its not a lot of interpretation :) is it?

You know :) I've read a few wxwidgets examples, and I've never needed anything more than the two rules from my wxWidgets / wxPerl / wxGlade tutorial, basically

wxWidget to Wx::Widget , wxWidget( to Wx::Widget->new(  s{wx([A-Z]\w+)(\()?}{"Wx::$1" .($2?"->new(":"")}ge; the constructor is called ->new

 wxWidget foo means a $foo which is a Wx::Widget object

That's it. There is one more that comes up if you view the c++ examples, and its dot to arrow  s{.}{->}g;

Ok, there are two more that everybody knows without trying, its ignore comments // /**/, usually taken care of by viewcvs if you're viewing online, or whatever syntax highlighting editor you're using offline

And ignore stuff in bold :) int *x, const wxPoint& pt

The only real issue I see, is that a lot of classes are stale

OTOH, take for example Wx/XS/Display.xsp its missing

int w() %code%{ RETVAL = THIS->w; %}; int h() %code%{ RETVAL = THIS->h; %}; int bpp() %code%{ RETVAL = THIS->bpp; %}; int refresh() %code%{ RETVAL = THIS->refresh; %};

Not a big deal, but this could be automated, much like the wxwidget docs are automated (now with more automation)

And there could be a wxPerlDocs distribution release, that uses File::ShareDir to package up a perl-ified version of the wxwidgets docs, that comes with a wxperldocs command that launches the docs in your favorite browser (mimeopen, openit )


swigtools uses xml generated by doxygen to generate swig, swig can be used to generate perl bindings

without much work, perl-specific docs could be generated, missing member accessors could be exposed, missing methods could be exposed, missing classes could be exposed ... Its unclear how often these beginWxPerlOnly amendments are updated in wxWidgets docs

there is module_info but it doesn't work too well with Wx but these oneliners do :)

Replies are listed 'Best First'.
Re^3: wxPerl fails with a cryptic message: "variable is not of type Wx::Point"
by jmlynesjr (Chaplain) on Mar 10, 2013 at 02:32 UTC


    Not coming from a C++ background, it took a few light-bulb moments and much reading and rereading before the C++ documentation started making sense. It gets easier to use with experience.


    There's never enough time to do it right, but always enough time to do it over...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1022561]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-10-31 08:21 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (287 votes). Check out past polls.