问题
I've created an AppleScript app in Xcode and I would like to know how to get the app to quit after the window is closed.
回答1:
Add a applicationShouldTerminateAfterLastWindowClosed: method in your AppDelegate, for example:
on applicationShouldTerminateAfterLastWindowClosed_(sender)
return true
end applicationShouldTerminateAfterLastWindowClosed_
来源:https://stackoverflow.com/questions/8365737/quit-app-after-window-is-closed-in-applescript