diff options
Diffstat (limited to 'macosx/tkMacOSXHLEvents.c')
-rw-r--r-- | macosx/tkMacOSXHLEvents.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/macosx/tkMacOSXHLEvents.c b/macosx/tkMacOSXHLEvents.c index 9671ab9..ffbb06d 100644 --- a/macosx/tkMacOSXHLEvents.c +++ b/macosx/tkMacOSXHLEvents.c @@ -51,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 - @@ -186,7 +186,7 @@ QuitHandler( * quickly as possible. */ - eventPtr = (KillEvent *) ckalloc(sizeof(KillEvent)); + eventPtr = ckalloc(sizeof(KillEvent)); eventPtr->header.proc = ReallyKillMe; eventPtr->interp = interp; @@ -224,7 +224,7 @@ OappHandler( Tcl_GetCommandInfo(interp, "::tk::mac::OpenApplication", &dummy)){ int code = Tcl_EvalEx(interp, "::tk::mac::OpenApplication", -1, TCL_EVAL_GLOBAL); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return noErr; @@ -261,7 +261,7 @@ RappHandler( "::tk::mac::ReopenApplication", &dummy)) { int code = Tcl_EvalEx(interp, "::tk::mac::ReopenApplication", -1, TCL_EVAL_GLOBAL); if (code != TCL_OK){ - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return err; @@ -297,7 +297,7 @@ PrefsHandler( Tcl_GetCommandInfo(interp, "::tk::mac::ShowPreferences", &dummy)){ int code = Tcl_EvalEx(interp, "::tk::mac::ShowPreferences", -1, TCL_EVAL_GLOBAL); if (code != TCL_OK) { - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } } return noErr; @@ -388,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; @@ -474,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; @@ -545,7 +545,7 @@ ScriptHandler( theErr = FSRefToDString(&file, &scriptName); if (theErr == noErr) { - tclErr = Tcl_EvalFile(interp, Tcl_DStringValue(&scriptName)); + tclErr = Tcl_FSEvalFileEx(interp, Tcl_DStringValue(&scriptName), NULL); Tcl_DStringFree(&scriptName); } else { sprintf(errString, "AEDoScriptHandler: file not found"); @@ -632,7 +632,7 @@ ReallyKillMe( * Should be never reached... */ - Tcl_BackgroundError(interp); + Tcl_BackgroundException(interp, code); } return 1; } |