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"
Thank you, Stefan, for the thorough answer, and the investment of time and energy. Your post is really helpful. The program, the way you tweaked it, works fine.
And many thanks to kcott and the other Anonymous Monks who pitched in and responded.
Following up: Stefan and Monks, I'll be thankful to you if you could help me with the following questions (apologizing beforehand if some of them are quasi-newbie's):
- If you examine the Python code example, http://www.blog.pythonlibrary.org/2011/01/04/wxpython-wx-listctrl-tips-and-tricks/, see the lines:
Then for self.index = 0 we port it to Perl by declaring a new variable: my $idx =0; So, to port the second line, why not declare a new variable: my $list_ctrl; ?self.index = 0 self.list_ctrl = wx.ListCtrl(panel, size=(-1,100), style=wx.LC_REPORT |wx.BORDER_SUNKEN ) - and what kind of object is $self->{list_ctrl} ? Is it a reference to an anonymous hash? and where is list_ctrl now defined?
- When do you use &Wx::wxLC_SOMETHING, and when just: wxLC_SOMETHING? I notice that you haven't changed it everywhere, but left in some of the subroutine calls?
- I notice that you did not include the lines:
If I do include them, compilation fails with: Can't locate object method "SetStringItem" via package "Wx::Perl::ListCtrl" at Wx List Control test v2.pl line 69.$self->{list_ctrl}->SetStringItem($idx, 1, '01/19/2010'); $self->{list_ctrl}->SetStringItem($idx, 2, 'USA');
How to overcome this? In other words, how do you modify/ insert strings in a ListCTRL line? - Looking ahead, the next necessary step for me, is to "tie" a database table to the Wx List Control, so that when the user scrolls at the GUI window, the application keeps retrieving database table lines (records) and displays them at the window.
Is there a way to "tie" an RDBMS table to a Wx List Control?
Thanks again for your thorough help - Helen
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: wxPerl fails with a cryptic message: "variable is not of type Wx::Point"
by stefbv (Curate) on Mar 09, 2013 at 12:10 UTC | |
by HelenCr (Monk) on Mar 09, 2013 at 16:13 UTC | |
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 | |
by Anonymous Monk on Mar 09, 2013 at 10:41 UTC |
In Section
Seekers of Perl Wisdom