No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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
Is there a way to "tie" an RDBMS table to a Wx List Control? Yes, its called programming :P In reply to Re^3: wxPerl fails with a cryptic message: "variable is not of type Wx::Point"
by Anonymous Monk
|
|