Hello all,
I've got a random issue, that I'm having a hell of a time tracking down and am hoping someone can help or give a suggestion.
The MListbox seems to work fine till it will randomly stop displaying results and I get the following error.
Can't use string ("") as a subroutine ref while "strict refs" in use at /usr/lib/perl5/vendor_perl/5.8.8/Tk/MListbox.pm line 700.
I've checked my returned results and nothing changes or is strange.
Here is the section of code that is having issues.
UPDATE:
Upon further looking, a variable in the MListbox.pm becomes undef. Which I'm not sure how that's happening. Maybe someone who understands it more than I will know?
The second section of code is taken from MListbox.pm. $code becomes undef.
my $searchRes = $top->DialogBox(-title => 'Search Results',
-buttons => ['OK', 'Cancel'],)
+;
my @dispRes = qw(ID FirstName LastName);
my $ml = $searchRes->Scrolled(
qw/MListbox -selectmode single -scrollbars oe -font sm
+all /
)->pack(-expand => 1, -fill => 'both');
foreach my $colHdrs (@dispRes){
$ml->columnInsert('end',-text=>$colHdrs);
}
foreach (@dispRes){
push @row, $hash{$_};
}
$ml->insert('end', \@row);
$ml->see('end'); <-- Error get's thrown here
print Dumper($ml->getRow('end'));
$ml->update;
my $answer = $searchRes->Show();
sub _selectionUpdate {
my ($w, $code, $l, @args) = @_;
;
if (@args) {
foreach (@{$w->{'_columns'}}) {
&$code($_->Subwidget("listbox"), @args);
}
} else {
&$code($w->{'_columns'}->[0]->Subwidget("listbox"));
}
}