|
|
| Perl-Sensitive Sunglasses | |
| PerlMonks |
Re^3: Entry Widget - validatecommandby Athanasius (Vicar) |
| on Jul 24, 2012 at 02:23 UTC ( #983273=note: print w/ replies, xml ) | Need Help?? |
|
this code ... is allowing inputs other than numbers Not so! For the record, here is the exact code I am running (using Strawberry perl v5.16.0 built for MSWin32-x86-multi-thread-64int, running under Windows Vista 32-bit, and with Tk 804.030):
This lets me enter -42, 763, etc., but if I try to enter a letter, or a punctuation symbol, or a minus sign anywhere after the first character, or even a space, I immediately get the message “The input must be an integer.” and my input never makes it into the Entry box. In other words, the code is working exactly as required. Athanasius <°(((>< contra mundum
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||