diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-24 19:41:30 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2012-07-24 19:41:30 (GMT) |
commit | a161a378971b948143b658e432ce13b723c25f89 (patch) | |
tree | 27a19c720909b8a4b9391764f0bf7e7598f9df24 /win/tkWinSend.c | |
parent | a7cecb5c00243f374eaf3d64c5905042633e888b (diff) | |
download | tk-a161a378971b948143b658e432ce13b723c25f89.zip tk-a161a378971b948143b658e432ce13b723c25f89.tar.gz tk-a161a378971b948143b658e432ce13b723c25f89.tar.bz2 |
a few more places
Diffstat (limited to 'win/tkWinSend.c')
-rw-r--r-- | win/tkWinSend.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/win/tkWinSend.c b/win/tkWinSend.c index a8e2109..a40c238 100644 --- a/win/tkWinSend.c +++ b/win/tkWinSend.c @@ -1,4 +1,4 @@ -/* +`/* * tkWinSend.c -- * * This file provides functions that implement the "send" command, @@ -136,9 +136,7 @@ Tk_SetAppName( HRESULT hr = S_OK; interp = winPtr->mainPtr->interp; - - tsdPtr = (ThreadSpecificData *) - Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); + tsdPtr = Tcl_GetThreadData(&dataKey, sizeof(ThreadSpecificData)); /* * Initialise the COM library for this interpreter just once. @@ -147,8 +145,9 @@ Tk_SetAppName( if (tsdPtr->initialized == 0) { hr = CoInitialize(0); if (FAILED(hr)) { - Tcl_SetResult(interp, - "failed to initialize the COM library", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "failed to initialize the COM library", -1)); + Tcl_SetErrorcode(interp, "TK", "SEND", "COM", NULL); return ""; } tsdPtr->initialized = 1; @@ -363,8 +362,10 @@ Tk_SendObjCmd( */ if (displayPtr) { - Tcl_SetResult(interp, "option not implemented: \"displayof\" is " - "not available for this platform.", TCL_STATIC); + Tcl_SetObjResult(interp, Tcl_NewStringObj( + "option not implemented: \"displayof\" is not available" + " for this platform.", -1)); + Tcl_SetErrorcode(interp, "TK", "SEND", "DISPLAYOF_WIN", NULL); result = TCL_ERROR; } @@ -436,9 +437,10 @@ FindInterpreterObject( pUnkInterp->lpVtbl->Release(pUnkInterp); } else { - Tcl_ResetResult(interp); - Tcl_AppendResult(interp, - "no application named \"", name, "\"", NULL); + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "no application named \"%s\"", name)); + Tcl_SetErrorcode(interp, "TK", "LOOKUP", "APPLICATION", + NULL); result = TCL_ERROR; } |