diff options
author | dkf <dkf@noemail.net> | 2012-07-24 08:33:36 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2012-07-24 08:33:36 (GMT) |
commit | d16c1591b4da26169cf762f7a5421a65a78b9a87 (patch) | |
tree | 9e1dfba4bbd2afe24d34c1416d837895e35f818a /generic/ttk/ttkEntry.c | |
parent | db0b8cc05b59328e7eacfb833b975f732be99327 (diff) | |
download | tk-d16c1591b4da26169cf762f7a5421a65a78b9a87.zip tk-d16c1591b4da26169cf762f7a5421a65a78b9a87.tar.gz tk-d16c1591b4da26169cf762f7a5421a65a78b9a87.tar.bz2 |
Ttk and Aqua done
FossilOrigin-Name: 8a123a49c24108efb1acca6d7100c1cb391a895b
Diffstat (limited to 'generic/ttk/ttkEntry.c')
-rw-r--r-- | generic/ttk/ttkEntry.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/generic/ttk/ttkEntry.c b/generic/ttk/ttkEntry.c index ed779dd..c85751e 100644 --- a/generic/ttk/ttkEntry.c +++ b/generic/ttk/ttkEntry.c @@ -1322,9 +1322,10 @@ EntryIndex( *indexPtr = entryPtr->entry.xscroll.last; } else if (strncmp(string, "sel.", 4) == 0) { if (entryPtr->entry.selectFirst < 0) { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "selection isn't in widget ", - Tk_PathName(entryPtr->core.tkwin), NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "selection isn't in widget %s", + Tk_PathName(entryPtr->core.tkwin))); + Tcl_SetErrorCode(interp, "TTK", "ENTRY", "NO_SELECTION", NULL); return TCL_ERROR; } if (strncmp(string, "sel.first", length) == 0) { @@ -1376,8 +1377,9 @@ EntryIndex( return TCL_OK; badIndex: - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, "bad entry index \"", string, "\"", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "bad entry index \"%s\"", string)); + Tcl_SetErrorCode(interp, "TTK", "ENTRY", "INDEX", NULL); return TCL_ERROR; } @@ -1782,9 +1784,9 @@ static int ComboboxCurrentCommand( return TCL_ERROR; } if (currentIndex < 0 || currentIndex >= nValues) { - Tcl_AppendResult(interp, - "Index ", Tcl_GetString(objv[2]), " out of range", - NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "Index %s out of range", Tcl_GetString(objv[2]))); + Tcl_SetErrorCode(interp, "TTK", "COMBOBOX", "IDX_RANGE", NULL); return TCL_ERROR; } |