summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-30 07:46:19 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-30 07:46:19 (GMT)
commitca5623894dd113cd5642189574cf6c104c64cad8 (patch)
tree7e57204b12abc171ad343d007edecaf1b17cdf09 /macosx/tkMacOSXEmbed.c
parent27b42b57118a651074b7f1fcc859fc4ae00090d0 (diff)
downloadtk-ca5623894dd113cd5642189574cf6c104c64cad8.zip
tk-ca5623894dd113cd5642189574cf6c104c64cad8.tar.gz
tk-ca5623894dd113cd5642189574cf6c104c64cad8.tar.bz2
Working towards making the error codes more consistent.
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index 8499faa..a154e09 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/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;
}
/*