summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXEmbed.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-24 08:33:36 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-24 08:33:36 (GMT)
commit6e09a9703456322887ccbb46773d401906507aba (patch)
tree9e1dfba4bbd2afe24d34c1416d837895e35f818a /macosx/tkMacOSXEmbed.c
parent571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (diff)
downloadtk-6e09a9703456322887ccbb46773d401906507aba.zip
tk-6e09a9703456322887ccbb46773d401906507aba.tar.gz
tk-6e09a9703456322887ccbb46773d401906507aba.tar.bz2
Ttk and Aqua done
Diffstat (limited to 'macosx/tkMacOSXEmbed.c')
-rw-r--r--macosx/tkMacOSXEmbed.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/macosx/tkMacOSXEmbed.c b/macosx/tkMacOSXEmbed.c
index d6ce254..8499faa 100644
--- a/macosx/tkMacOSXEmbed.c
+++ b/macosx/tkMacOSXEmbed.c
@@ -208,8 +208,9 @@ TkpUseWindow(
Container *containerPtr;
if (winPtr->window != None) {
- Tcl_AppendResult(interp, "can't modify container after widget is "
- "created", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "can't modify container after widget is created", -1));
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "CREATION", NULL);
return TCL_ERROR;
}
@@ -229,8 +230,10 @@ TkpUseWindow(
usePtr = (TkWindow *) Tk_IdToWindow(winPtr->display, (Window) parent);
if (usePtr != NULL) {
if (!(usePtr->flags & TK_CONTAINER)) {
- Tcl_AppendResult(interp, "window \"", usePtr->pathName,
- "\" doesn't have -container option set", NULL);
+ 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;
}
}
@@ -305,15 +308,17 @@ TkpUseWindow(
if (containerPtr == NULL) {
/*
- * If someone has registered an in process embedding handler, then
+ * If someone has registered an in-process embedding handler, then
* see if it can handle this window...
*/
if (tkMacOSXEmbedHandler == NULL ||
tkMacOSXEmbedHandler->registerWinProc((long) parent,
(Tk_Window) winPtr) != TCL_OK) {
- Tcl_AppendResult(interp, "The window ID ", string,
- " does not correspond to a valid Tk Window.", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "The window ID %s does not correspond to a valid Tk Window",
+ string));
+ Tcl_SetErrorCode(interp, "TK", "EMBED", "HANDLE", NULL);
return TCL_ERROR;
}