my $mode = $cw->cget('-validate') || "none";
To ensure that there was a value. The thing is it should never have been left to default to undef like it had. I think my preferred fix would be to set a default from the very start ... say at line 207:
-validate => [qw/METHOD validate Validate none/],
It's worth mentioning that the newer versions of JComboBox don't have this problem. The newer version also has features that look like they would have helped folks who have posted here before.
This is probably the first time I've ever checked perlmonks for problems encountered with JComboBox -- I find it a little odd that the questions weren't posted to comp.lang.perl.tk, but I'm glad that folks were able to get help with it, or find better solutions.
Rob
|