Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

No wxTextCompleterSimple class?

by einhverfr (Friar)
on Nov 15, 2013 at 09:51 UTC ( #1062724=perlquestion: print w/replies, xml ) Need Help??
einhverfr has asked for the wisdom of the Perl Monks concerning the following question:

Fellow monks

Still working on the wxperl point of sale application and trying to add autocomplete to some text fields.

The wxwidget documentation mentions a wxTextCompleter and a wxTextCompleterSimple class. I have tried to instantiate these and I keep getting errors that the class is empty. Am I missing something? Is there a workable alternative for wxWidget-based applications?

The lines in my code are:

package Package::Name; # not the real name but... use Wx; use base 'Wx::wxTextCompleterSimple'; # these lines copied verbatim
My error is: Base class package "Wx::wxTextCompleterSimple" is empty.

Replies are listed 'Best First'.
Re: No wxTextCompleterSimple class? ( nope )
by Anonymous Monk on Nov 15, 2013 at 10:11 UTC

      Thanks, the lines were copied from my source code.

      What I was trying to find is where I was going wrong. It looks like my system has wxwidgets 2.8 which is the main source of the problem. Apparently it is a good idea to follow the same version of docs and code...

      I ended up switching for now from textboxes to comboboxes to try to implement my own autocomplete that way. However if I setfocus to the combobox, it selects the text which makes it very hard to change the combinations in it. Do you know of a good way to do autocomplete with wxPerl and wxwidgets 2.8?

      Edit: Never mind. I found that the issue was that the best thing to do was to avoid setting the value, and instead process the items on the list.

Re: No wxTextCompleterSimple class?
by stefbv (Deacon) on Nov 15, 2013 at 09:59 UTC

    What wxWidgets version do you use?

    Conform to the docs is only available since 2.9.2.

    Update:It looks like Wx Version: 0,9921 wxWidgets 2.9.4 doesn't know about it...

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1062724]
Approved by GrandFather
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2016-10-28 21:46 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (387 votes). Check out past polls.