diff options
author | dgp <dgp@users.sourceforge.net> | 2008-12-09 21:22:55 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-12-09 21:22:55 (GMT) |
commit | 8dbcb4b276318e6b06a7f576e0f5c87875a52a67 (patch) | |
tree | e39ebc39fa16df5aad460109866ff73b8cbf2df6 /macosx/tkMacOSXMenus.c | |
parent | 9d585802147a2634f25b95e7b75438b0262737e8 (diff) | |
download | tk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.zip tk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.tar.gz tk-8dbcb4b276318e6b06a7f576e0f5c87875a52a67.tar.bz2 |
TIP 337
* generic/tkBind.c: Updated callers of Tcl_BackgroundError()
* generic/tkCanvas.c: to use the new routine
* generic/tkEntry.c: Tcl_BackgroundException() as appropriate.
* generic/tkImgBmap.c:
* generic/tkListbox.c:
* generic/tkSelect.c:
* generic/tkTextDisp.c:
* generic/tkTextWind.c:
* macosx/tkMacOSXHLEvents.c:
* macosx/tkMacOSXMenu.c:
* macosx/tkMacOSXMenus.c:
* macosx/tkMacOSXScale.c:
* macosx/tkMacOSXWindowEvent.c:
* unix/tkUnixScale.c:
* unix/tkUnixWm.c:
* win/tkWinButton.c:
* win/tkWinMenu.c:
* win/tkWinScrlbr.c:
* win/tkWinWm.c:
Diffstat (limited to 'macosx/tkMacOSXMenus.c')
-rw-r--r-- | macosx/tkMacOSXMenus.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/macosx/tkMacOSXMenus.c b/macosx/tkMacOSXMenus.c index 89867fe..7bfcca5 100644 --- a/macosx/tkMacOSXMenus.c +++ b/macosx/tkMacOSXMenus.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.23 2008/12/07 16:36:26 das Exp $ + * RCS: @(#) $Id: tkMacOSXMenus.c,v 1.24 2008/12/09 21:22:56 dgp Exp $ */ #include "tkMacOSXPrivate.h" @@ -102,6 +102,7 @@ TkMacOSXHandleMenuSelect( Window window; TkDisplay *dispPtr; Tcl_CmdInfo dummy; + int code; if (theItem == 0) { TkMacOSXClearMenubarActive(); @@ -116,9 +117,10 @@ TkMacOSXHandleMenuSelect( Tcl_GetCommandInfo(gInterp, "tkAboutDialog", &dummy) == 0) { TkAboutDlg(); } else { - if (Tcl_EvalEx(gInterp, "tkAboutDialog", -1, - TCL_EVAL_GLOBAL) != TCL_OK) { - Tcl_BackgroundError(gInterp); + code = Tcl_EvalEx(gInterp, "tkAboutDialog", -1, + TCL_EVAL_GLOBAL); + if (code != TCL_OK) { + Tcl_BackgroundException(gInterp, code); } Tcl_ResetResult(gInterp); } @@ -138,8 +140,9 @@ TkMacOSXHandleMenuSelect( Tcl_GetStringFromObj(path, &len); if (len) { Tcl_IncrRefCount(path); - if (Tcl_FSEvalFile(gInterp, path) == TCL_ERROR) { - Tcl_BackgroundError(gInterp); + code = Tcl_FSEvalFile(gInterp, path); + if (code != TCL_OK) { + Tcl_BackgroundException(gInterp, code); } Tcl_DecrRefCount(path); } @@ -153,8 +156,9 @@ TkMacOSXHandleMenuSelect( if (path) { Tcl_IncrRefCount(path); - if (Tcl_FSEvalFile(gInterp, path) == TCL_ERROR) { - Tcl_BackgroundError(gInterp); + code = Tcl_FSEvalFile(gInterp, path); + if (code != TCL_OK) { + Tcl_BackgroundException(gInterp, code); } Tcl_DecrRefCount(path); Tcl_ResetResult(gInterp); |