Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm having an issue executing a piece of code on Mac OSX 10.4. It seems as though the GetSelection method derived from wxControlWithItems isn't being recognized on my mac. From my code snippet below:
my ( $self ) = @_; if( ( my $idx = $self->{accounts_listbox}->GetSelection() ) != wxNOT_ +FOUND ) { my $username = $self->{accounts_listbox}->GetString( ($idx) ); ...
I get the following error:
Can't locate object method "GetSelection" via package "Wx::ListBox"
Any thoughts? This same code works perfectly on my Win32 box.

Replies are listed 'Best First'.
Re: wxControlWithItems ?
by Anonymous Monk on Oct 11, 2009 at 16:58 UTC
    Any thoughts? This same code works perfectly on my Win32 box.

    Upgrade

    $ perl -MWx -le " die Wx::ListBox->new->GetSelection " 0 at -e line 1. $ pmvers Wx Alien::wxWidgets Wx: 0.92 Alien::wxWidgets: 0.44
      I forgot to mention I'm using ActivateState Perl n both my windows and mac box. The versions are both up to date:
      Wx: 0.93 Alien::WxWigdets: 0.44
      Was there an option I missed when compiling Wx maybe?
        Which version of wxWidgets?
        $ perl -mWx -e"die Wx::wxVERSION_STRING" wxWidgets 2.8.10 at -e line 1.