jcreedcmu / twelf-mac

Other
0 stars 1 forks source link

Respond to AppleEvents #9

Closed jcreedcmu closed 6 months ago

jcreedcmu commented 6 months ago

At least Quit

jcreedcmu commented 6 months ago

When I put ExitToShell(); before the return noErr; and run the script

on run
 tell application "TESample"
  quit
 end tell
end run

in ScriptEditor, then indeed TESample closes, but then ScriptEditor beachballs forever. I imagine I'm somehow supposed to communicate back to the apple event sender that I've successfully handled the event.

jcreedcmu commented 6 months ago

Returning noErr and just setting a global that lets us fall out of the event loop suffices.