summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-06-13 18:15:06 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-06-13 18:15:06 (GMT)
commitb86c6231e86bfa44b4a59bcfbbc1f1175554e3de (patch)
tree1dcb927999417b20f0a43f7776a2a08f7655159b
parent071c2bc37e46d0c38bbdf5fe4bb4c94f70574b60 (diff)
downloadtk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.zip
tk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.tar.gz
tk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.tar.bz2
[Bug 3315731] Fix [$entry -invcmd].
-rw-r--r--ChangeLog4
-rw-r--r--generic/tkEntry.c8
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 90b530e..0b71c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2011-06-10 Don Porter <dgp@users.sourceforge.net>
+ * generic/tkEntry.c: [Bug 3315731] Fix [$entry -invcmd].
+
+2011-06-10 Don Porter <dgp@users.sourceforge.net>
+
* README: Correct some README bitrot.
* macosx/README:
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index 64bbaad..f32a03b 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -3269,17 +3269,19 @@ EntryValidateChange(
if (varValidate) {
entryPtr->validate = VALIDATE_NONE;
} else if (entryPtr->invalidCmd != NULL) {
+ int result;
+
Tcl_DStringInit(&script);
ExpandPercents(entryPtr, entryPtr->invalidCmd,
change, newValue, index, type, &script);
Tcl_DStringAppend(&script, "", 1);
p = Tcl_DStringValue(&script);
- code = Tcl_EvalEx(entryPtr->interp, p, -1,
+ result = Tcl_EvalEx(entryPtr->interp, p, -1,
TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT);
- if (code != TCL_OK) {
+ if (result != TCL_OK) {
Tcl_AddErrorInfo(entryPtr->interp,
"\n\t(in invalidcommand executed by entry)");
- Tcl_BackgroundException(entryPtr->interp, code);
+ Tcl_BackgroundException(entryPtr->interp, result);
code = TCL_ERROR;
entryPtr->validate = VALIDATE_NONE;
}