diff options
Diffstat (limited to 'macosx/tkMacOSXHLEvents.c')
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index a886408..362f752 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -10,8 +10,6 @@ * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id$ */ #include "tkMacOSXPrivate.h" @@ -53,15 +51,15 @@ static OSStatus FSRefToDString(const FSRef *fsref, Tcl_DString *ds); #pragma mark TKApplication(TKHLEvents) @implementation TKApplication(TKHLEvents) - -- (void)terminate:(id)sender { +- (void) terminate: (id) sender +{ QuitHandler(NULL, NULL, (SRefCon) _eventInterp); } -- (void)preferences:(id)sender { +- (void) preferences: (id) sender +{ PrefsHandler(NULL, NULL, (SRefCon) _eventInterp); } - @end #pragma mark - @@ -188,7 +186,7 @@ QuitHandler( * quickly as possible. */ - eventPtr = (KillEvent *) ckalloc(sizeof(KillEvent)); + eventPtr = ckalloc(sizeof(KillEvent)); eventPtr->header.proc = ReallyKillMe; eventPtr->interp = interp; @@ -226,7 +224,7 @@ OappHandler( Tcl_GetCommandInfo(interp, "::tk::mac::OpenApplication", &dummy)){ int code = Tcl_GlobalEval(interp, "::tk::mac::OpenApplication"); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return noErr; @@ -263,7 +261,7 @@ RappHandler( "::tk::mac::ReopenApplication", &dummy)) { int code = Tcl_GlobalEval(interp, "::tk::mac::ReopenApplication"); if (code != TCL_OK){ - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return err; @@ -299,7 +297,7 @@ PrefsHandler( Tcl_GetCommandInfo(interp, "::tk::mac::ShowPreferences", &dummy)){ int code = Tcl_GlobalEval(interp, "::tk::mac::ShowPreferences"); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return noErr; @@ -390,7 +388,7 @@ OdocHandler( code = Tcl_EvalEx(interp, Tcl_DStringValue(&command), Tcl_DStringLength(&command), TCL_EVAL_GLOBAL); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } Tcl_DStringFree(&command); return noErr; @@ -476,7 +474,7 @@ PrintHandler( code = Tcl_EvalEx(interp, Tcl_DStringValue(&command), Tcl_DStringLength(&command), TCL_EVAL_GLOBAL); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } Tcl_DStringFree(&command); return noErr; @@ -634,7 +632,7 @@ ReallyKillMe( * Should be never reached... */ - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } return 1; } @@ -702,7 +700,7 @@ FSRefToDString( /* * Local Variables: - * mode: c + * mode: objc * c-basic-offset: 4 * fill-column: 79 * coding: utf-8 |