summaryrefslogtreecommitdiffstats
path: root/generic/ttk/ttkState.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2012-07-24 08:33:36 (GMT)
committerdkf <dkf@noemail.net>2012-07-24 08:33:36 (GMT)
commitd16c1591b4da26169cf762f7a5421a65a78b9a87 (patch)
tree9e1dfba4bbd2afe24d34c1416d837895e35f818a /generic/ttk/ttkState.c
parentdb0b8cc05b59328e7eacfb833b975f732be99327 (diff)
downloadtk-d16c1591b4da26169cf762f7a5421a65a78b9a87.zip
tk-d16c1591b4da26169cf762f7a5421a65a78b9a87.tar.gz
tk-d16c1591b4da26169cf762f7a5421a65a78b9a87.tar.bz2
Ttk and Aqua done
FossilOrigin-Name: 8a123a49c24108efb1acca6d7100c1cb391a895b
Diffstat (limited to 'generic/ttk/ttkState.c')
-rw-r--r--generic/ttk/ttkState.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/generic/ttk/ttkState.c b/generic/ttk/ttkState.c
index ab2b7ed..151dc4d 100644
--- a/generic/ttk/ttkState.c
+++ b/generic/ttk/ttkState.c
@@ -98,8 +98,9 @@ static int StateSpecSetFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr)
if (stateNames[j] == 0) {
if (interp) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "Invalid state name ", stateName,NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "Invalid state name %s", stateName));
+ Tcl_SetErrorCode(interp, "TTK", "VALUE", "STATE", NULL);
}
return TCL_ERROR;
}
@@ -216,8 +217,8 @@ Tcl_Obj *Ttk_StateMapLookup(
return specs[j+1];
}
if (interp) {
- Tcl_ResetResult(interp);
- Tcl_AppendResult(interp, "No match in state map", NULL);
+ Tcl_SetObjResult(interp, Tcl_NewStringObj("No match in state map", -1));
+ Tcl_SetErrorCode(interp, "TTK", "LOOKUP", "STATE", NULL);
}
return NULL;
}
@@ -240,9 +241,11 @@ Ttk_StateMap Ttk_GetStateMapFromObj(
return NULL;
if (nSpecs % 2 != 0) {
- if (interp)
+ if (interp) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"State map must have an even number of elements", -1));
+ Tcl_SetErrorCode(interp, "TTK", "VALUE", "STATEMAP", NULL);
+ }
return 0;
}