|
From: Joe E. <jen...@fl...> - 2005-09-23 21:39:21
|
New patch 1302146 posted to SourceForge:
<URL: http://sourceforge.net/tracker/index.php?func=detail&aid=1302146&group_id=11464&atid=311464 >
This changes how the [ttk::entry] widget uses the 'invalid'
state bit as follows:
+ In prevalidation (-validate key), the result of
-validatecommand only determines whether the edit
should be accepted or rejected. It no longer clears
the 'invalid' bit, and will reject edits on validation
failure even if the widget is currently invalid.
+ In revalidation (-validate focus/focusin/focusout, or
calling [$e validate]), the result of -validatecommand
is used to set or clear the 'invalid' bit.
This is simpler and more orthogonal than the current logic;
whether it's more useful remains to be seen :-) Please try it
out and let me know.
Other things I'm considering: possibly, allow -validatecommand to
return the empty string to indicate "Don't do anything, I'm being
used for side effects only".
Another possibility is to split '-validatecommand' into two options,
one for prevalidation and another for revalidation. This would
clear up a lot of ambiguities with the current API, but would add
another incompatibility with the core [entry] widget.
--Joe English
jen...@fl...
|