summaryrefslogtreecommitdiffstats
path: root/carbon/tkMacOSXEmbed.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2012-07-30 07:46:19 (GMT)
committerdkf <dkf@noemail.net>2012-07-30 07:46:19 (GMT)
commit2112a76a64dc50c4e3dd1605bbf24cc0336c9987 (patch)
tree7e57204b12abc171ad343d007edecaf1b17cdf09 /carbon/tkMacOSXEmbed.c
parent24ad994d9e222210ff92f2ed12398a7178f55b34 (diff)
downloadtk-2112a76a64dc50c4e3dd1605bbf24cc0336c9987.zip
tk-2112a76a64dc50c4e3dd1605bbf24cc0336c9987.tar.gz
tk-2112a76a64dc50c4e3dd1605bbf24cc0336c9987.tar.bz2
Working towards making the error codes more consistent.
FossilOrigin-Name: 45327b3d6fc9c1c7c415e8c25e98639bed019d84
Diffstat (limited to 'carbon/tkMacOSXEmbed.c')
-rw-r--r--carbon/tkMacOSXEmbed.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/carbon/tkMacOSXEmbed.c b/carbon/tkMacOSXEmbed.c
index e99740c..39e9aaa 100644
--- a/carbon/tkMacOSXEmbed.c
+++ b/carbon/tkMacOSXEmbed.c
@@ -210,7 +210,7 @@ TkpUseWindow(
if (winPtr->window != None) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"can't modify container after widget is created", -1));
- Tcl_SetErrorCode(interp, "TK", "EMBED", "CREATION", NULL);
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "POST_CREATE", NULL);
return TCL_ERROR;
}
@@ -228,14 +228,12 @@ TkpUseWindow(
}
usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, (Window) parent);
- if (usePtr != NULL) {
- if (!(usePtr->flags & TK_CONTAINER)) {
- Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "window \"%s\" doesn't have -container option set",
- usePtr->pathName));
- Tcl_SetErrorCode(interp, "TK", "EMBED", "TARGET", NULL);
- return TCL_ERROR;
- }
+ if (usePtr != NULL && !(usePtr->flags & TK_CONTAINER)) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "window \"%s\" doesn't have -container option set",
+ usePtr->pathName));
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "CONTAINER", NULL);
+ return TCL_ERROR;
}
/*