summaryrefslogtreecommitdiffstats
path: root/generic
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 /generic
parent071c2bc37e46d0c38bbdf5fe4bb4c94f70574b60 (diff)
downloadtk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.zip
tk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.tar.gz
tk-b86c6231e86bfa44b4a59bcfbbc1f1175554e3de.tar.bz2
[Bug 3315731] Fix [$entry -invcmd].
Diffstat (limited to 'generic')
-rw-r--r--generic/tkEntry.c8
1 files changed, 5 insertions, 3 deletions
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;
}