Nathan,
I figured the quit handler went the way of idle and is no longer being supported in Applescript Objective-C, but I just tried it and 'tell me to quit' works. But now it invokes the application's delegate applicationShouldTerminate_() handler. And when I tried supplying the normal Applescript quit handler things got weird. The quit handler would run but did nothing to terminate the application, i.e., no different than a normal applescript run handler being invoked. And whenever I tried using a 'continue' command in the quit handler it always gave me a run-time error, never going on to quit the application or invoke applicationShouldTerminate_.
So the answer seems to be 'tell me to quit' is still supported but the old 'quit' handler isn't. Seems odd to me.
-- Dave
On Dec 28, 2010, at 9:14 AM, Nathan Greenstein wrote: I use tell me to quit Is Shane's method more proper?
-- Nathan Greenstein email@hidden
On Mon, Dec 27, 2010 at 22:42, Dave <email@hidden> wrote:
I've tried the following to cause my application to terminate. They don't do anything and no syslog messages are emitted. I've resorted to calling my own Obj-C method to invoke terminate.
tell current application to terminate_(me)
current application's terminate_(me) current application's NSApplication's terminate_(me)
current application's sharedApplication()'s terminate_(me)
My Objective-C method, which does work, is:
+ (void)TerminateApplication
{ [NSApp terminate:nil];
}
-- Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
|