summaryrefslogtreecommitdiffstats
path: root/generic/tkEntry.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-12-09 21:22:55 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-12-09 21:22:55 (GMT)
commit8dbcb4b276318e6b06a7f576e0f5c87875a52a67 (patch)
treee39ebc39fa16df5aad460109866ff73b8cbf2df6 /generic/tkEntry.c
parent9d585802147a2634f25b95e7b75438b0262737e8 (diff)
downloadtk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.zip
tk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.tar.gz
tk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.tar.bz2
TIP 337
* generic/tkBind.c: Updated callers of Tcl_BackgroundError() * generic/tkCanvas.c: to use the new routine * generic/tkEntry.c: Tcl_BackgroundException() as appropriate. * generic/tkImgBmap.c: * generic/tkListbox.c: * generic/tkSelect.c: * generic/tkTextDisp.c: * generic/tkTextWind.c: * macosx/tkMacOSXHLEvents.c: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXWindowEvent.c: * unix/tkUnixScale.c: * unix/tkUnixWm.c: * win/tkWinButton.c: * win/tkWinMenu.c: * win/tkWinScrlbr.c: * win/tkWinWm.c:
Diffstat (limited to 'generic/tkEntry.c')
-rw-r--r--generic/tkEntry.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/generic/tkEntry.c b/generic/tkEntry.c
index aae87dc..44ea933 100644
--- a/generic/tkEntry.c
+++ b/generic/tkEntry.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkEntry.c,v 1.56 2008/11/27 23:26:05 nijtmans Exp $
+ * RCS: @(#) $Id: tkEntry.c,v 1.57 2008/12/09 21:22:56 dgp Exp $
*/
#include "tkInt.h"
@@ -2940,7 +2940,7 @@ EntryUpdateScrollbar(
"\n (horizontal scrolling command executed by ");
Tcl_AddErrorInfo(interp, Tk_PathName(entryPtr->tkwin));
Tcl_AddErrorInfo(interp, ")");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, code);
}
Tcl_ResetResult(interp);
Tcl_Release(interp);
@@ -3141,10 +3141,10 @@ EntryValidate(
*/
if (code != TCL_OK && code != TCL_RETURN) {
- Tcl_AddErrorInfo(interp, "\n\t(in validation command executed by ");
- Tcl_AddErrorInfo(interp, Tk_PathName(entryPtr->tkwin));
- Tcl_AddErrorInfo(interp, ")");
- Tcl_BackgroundError(interp);
+ Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf(
+ "\n\t(in validation command executed by %s)",
+ Tk_PathName(entryPtr->tkwin)));
+ Tcl_BackgroundException(interp, code);
return TCL_ERROR;
}
@@ -3275,11 +3275,12 @@ EntryValidateChange(
change, newValue, index, type, &script);
Tcl_DStringAppend(&script, "", 1);
p = Tcl_DStringValue(&script);
- if (Tcl_EvalEx(entryPtr->interp, p, -1,
- TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT) != TCL_OK) {
+ code = Tcl_EvalEx(entryPtr->interp, p, -1,
+ TCL_EVAL_GLOBAL | TCL_EVAL_DIRECT);
+ if (code != TCL_OK) {
Tcl_AddErrorInfo(entryPtr->interp,
"\n\t(in invalidcommand executed by entry)");
- Tcl_BackgroundError(entryPtr->interp);
+ Tcl_BackgroundException(entryPtr->interp, code);
code = TCL_ERROR;
entryPtr->validate = VALIDATE_NONE;
}
@@ -4283,7 +4284,7 @@ SpinboxInvoke(
if (code != TCL_OK) {
Tcl_AddErrorInfo(interp, "\n\t(in command executed by spinbox)");
- Tcl_BackgroundError(interp);
+ Tcl_BackgroundException(interp, code);
/*
* Yes, it's an error, but a bg one, so we return OK