in reply to tk::matchentry changing the displayed choices

I'm not familiar with this TK module, but perhaps it is expecting a simple array as input? Your @dataa is an array consisting of one element. That one element is an array consisting of 4 elements. I think you are probably looking for a simple array of 4 elements.

Try this:

#!/usr/bin/env perl use warnings; use strict; use Data::Dumper; #my @dataa = [ qw/Abberley Abberton Abbotsley Accrington/]; my @dataa = qw/Abberley Abberton Abbotsley Accrington/; print Dumper(\@dataa);

Replies are listed 'Best First'.
Re^2: tk:matchentry changing the displayed choices
by gkx947n (Novice) on Jan 21, 2008 at 22:26 UTC
    Thank you for the quick response. You are indeed right but for some reason matchentry expects this. if i change it to an array of 4 elements the i get a error "Tk::Error: Odd number of args to Tk::MatchEntry->new" which i can only seem to be rid of if i set up my array as in my example