Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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 ( [id://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 )

update: http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/docs/doxygen/scripts/swig_tools.py
http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/docs/doxygen/

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 ...

http://sourceforge.net/p/wxperl/code/3445/tree/dist-tools/trunk/?? 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 (Deacon) on Mar 10, 2013 at 02:32 UTC

    AM:

    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.

    James

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (3)
As of 2024-04-19 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found