Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by Anonymous Monk
on Mar 09, 2013 at 10:27 UTC ( [id://1022550]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 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"

1 .. 2

yes, self is an object, a hash based object, it a reference to a hash, and yes those references are usually anonymous (outside of the constructor) :)

index and list_ctrl are attributes of the object -- its object oriented programming -- if they weren't attributes then you couldn't create 20 MyForm's and still have it work, you'd have to create an @index and @list_ctrl -- this is not good for a "Class" ( a module for making object)

See perlootut, Modern Perl

When do you use &Wx::wxLC_SOMETHING, and when just: wxLC_SOMETHING?

Whenever you want :)

There is a cost to importing constants into a package, and Wx has a lot of them (1mb worth or more), but they all already live in the Wx:: namespace so you can call them Wx::blahblah() and conserve memory -- padre does this, cause 100 subclasses * 1mb = 100mb, not good :)

OTOH, I suppose the same memory saving effect could be accomplished with less typing with use namespace::clean;

In any case, whether you type it, or you use a oneliner to fixup your constants, or use WxEXPORTS to cherrypick your exports, or whatever, do what hurts the least and fits your process

Can't locate object method "SetStringItem" ... How to overcome this

Read what you're reading closer, read the actual documentation, http://docs.wxwidgets.org/2.8/wx_wxlistctrl.html#wxlistctrlsetitem

wxPython note: In place of a single overloaded method name, wxPython implements the following methods: SetItem(item) Sets information about the given wxListItem. SetStringItem(index, col, label, imageId) Sets a string or image at a given location.

So taking a page out of my tutorial

$ perl -MWx -le " Wx::ListCtrl->new->SetItem" unable to resolve overloaded method for Wx::ListCtrl::SetItem at -e li +ne 1. $ perl -MWx -le " Wx::ListCtrl->new->SetItem( 1 .. 10 )" Usage: Wx::ListCtrl::SetItemString(THIS, index, col, label, image = -1 +) at -e line 1.

Is there a way to "tie" an RDBMS table to a Wx List Control?

Yes, its called programming :P

Replies are listed 'Best First'.
Re^4: wxPerl fails with a cryptic message: "variable is not of type Wx::Point" (Wx::DBI)
by Anonymous Monk on Mar 09, 2013 at 10:41 UTC

    Is there a way to "tie" an RDBMS table to a Wx List Control?
    Yes, its called programming :P

    I don't like it when stuff isn't on CPAN :) breaks the easy searches :) Wx::DBI, Wx::DBI::Form::Tree - a database aware tree

    Doesn't seem to have more than one user, but it could be workable

    update: or examples of use or a test suite

    Its still possible its workable, the some of the docs show methods, but I it leans towards no -- crafting an example would be work :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-03-19 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found