|Pathologically Eclectic Rubbish Lister|
Bug: Tk::Entry 804.027 validate?by strat (Canon)
|on Jul 02, 2007 at 10:27 UTC||Need Help??|
strat has asked for the
wisdom of the Perl Monks concerning the following question:
when I use -validate with Tk::Entry, I get unexpected behaviour in combination with -textvariable and changing the variable. For this example, I used a button to change the variable $entryText which should succeed until the value of 3 and fail for bigger values.
With Perl 5.008008 and Tk 804.024:
everything works fine, but with Perl-Versions >= 5.008008 and Tk Version 800.027 the validation stops when the first 0 is returned and so bigger values than 3 can be inserted via $entryText:
and the variable may become bigger than 3 since the validation stops. Additionally, the interface of validatecommand is changed (-1 vs. 6 for the same type of action which could break a lot of existing apps).
From perldoc Tk::Entry:
But returning 0 (or undef or nothing) is no error in my eyes.
Is this a bug, or am I the bug?