summaryrefslogtreecommitdiffstats
path: root/generic/tkPlace.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2012-07-23 13:59:40 (GMT)
commit571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (patch)
tree46a3064598e4a36c7ca561f9c08f5d22de4b2b9e /generic/tkPlace.c
parented7fb54396eee6e5122bfe611b2a14cf422970fa (diff)
downloadtk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.zip
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.gz
tk-571fd220b0be2da05b1a6e8bb32e0b9a447ed288.tar.bz2
Much more cleaning up of result handling.
Diffstat (limited to 'generic/tkPlace.c')
-rw-r--r--generic/tkPlace.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/generic/tkPlace.c b/generic/tkPlace.c
index a0d3562..8fe2bd1 100644
--- a/generic/tkPlace.c
+++ b/generic/tkPlace.c
@@ -619,8 +619,9 @@ ConfigureSlave(
Tk_Window masterWin = (Tk_Window) NULL;
if (Tk_TopWinHierarchy(tkwin)) {
- Tcl_AppendResult(interp, "can't use placer on top-level window \"",
- Tk_PathName(tkwin), "\"; use wm command instead", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't use placer on top-level window \"%s\"; use "
+ "wm command instead", Tk_PathName(tkwin)));
Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "TOPLEVEL", NULL);
return TCL_ERROR;
}
@@ -679,17 +680,17 @@ ConfigureSlave(
break;
}
if (Tk_TopWinHierarchy(ancestor)) {
- Tcl_AppendResult(interp, "can't place ",
- Tk_PathName(slavePtr->tkwin), " relative to ",
- Tk_PathName(tkwin), NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't place %s relative to %s",
+ Tk_PathName(slavePtr->tkwin), Tk_PathName(tkwin)));
Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "HIERARCHY", NULL);
goto error;
}
}
if (slavePtr->tkwin == tkwin) {
- Tcl_AppendResult(interp, "can't place ",
- Tk_PathName(slavePtr->tkwin), " relative to itself",
- NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "can't place %s relative to itself",
+ Tk_PathName(slavePtr->tkwin)));
Tcl_SetErrorCode(interp, "TK", "GEOMETRY", "LOOP", NULL);
goto error;
}