summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXBitmap.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/tkMacOSXBitmap.c
parent571fd220b0be2da05b1a6e8bb32e0b9a447ed288 (diff)
downloadtk-6e09a9703456322887ccbb46773d401906507aba.zip
tk-6e09a9703456322887ccbb46773d401906507aba.tar.gz
tk-6e09a9703456322887ccbb46773d401906507aba.tar.bz2
Ttk and Aqua done
Diffstat (limited to 'macosx/tkMacOSXBitmap.c')
-rw-r--r--macosx/tkMacOSXBitmap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/macosx/tkMacOSXBitmap.c b/macosx/tkMacOSXBitmap.c
index 0c94712..2610e3a 100644
--- a/macosx/tkMacOSXBitmap.c
+++ b/macosx/tkMacOSXBitmap.c
@@ -394,7 +394,8 @@ TkMacOSXIconBitmapObjCmd(
}
name = Tcl_GetStringFromObj(objv[i++], &len);
if (!len) {
- Tcl_AppendResult(interp, "empty bitmap name", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("empty bitmap name", -1));
+ Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "BAD", NULL);
goto end;
}
if (Tcl_GetIntFromObj(interp, objv[i++], &ib.width) != TCL_OK) {
@@ -409,19 +410,23 @@ TkMacOSXIconBitmapObjCmd(
}
value = Tcl_GetStringFromObj(objv[i++], &len);
if (!len) {
- Tcl_AppendResult(interp, "empty bitmap value", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("empty bitmap value", -1));
+ Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "EMPTY", NULL);
goto end;
}
#if 0
if ((kind == ICON_TYPE || kind == ICON_SYSTEM)) {
Tcl_DString ds;
Tcl_Encoding encoding = Tcl_GetEncoding(NULL, "macRoman");
+
Tcl_UtfToExternalDString(encoding, value, -1, &ds);
len = Tcl_DStringLength(&ds);
Tcl_DStringFree(&ds);
Tcl_FreeEncoding(encoding);
if (len > 4) {
- Tcl_AppendResult(interp, "invalid bitmap value", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(
+ "invalid bitmap value", -1));
+ Tcl_SetErrorCode(interp, "TK", "MACBITMAP", "INVALID", NULL);
goto end;
}
}
@@ -441,7 +446,7 @@ TkMacOSXIconBitmapObjCmd(
}
*iconBitmap = ib;
result = TCL_OK;
-end:
+ end:
return result;
}