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 |