Re: Can't quit from Dock or cmd-Q
Re: Can't quit from Dock or cmd-Q
- Subject: Re: Can't quit from Dock or cmd-Q
- From: has <email@hidden>
- Date: Fri, 25 Oct 2002 20:54:36 +0100
Paul Berkowitz wrote:
>
> on quit
>
> set _stop to true
>
> continue quit
>
> end quit
>
I've been trying to explain, from the beginning, that 'continue quit' DOES
>
NOT WORK in non-stay-open applications. It is ignored. I thought you told me
>
that 'this is not a bug and it's always been that way'. So why are you
>
including it?
To answer this question: 'continue quit' DOES work and is most certainly
NOT ignored. It just doesn't work the way you're _assuming_ it should. You
seem to believe 'quit' to be the ultimate instant application killer. It is
not. Continuing quit does _not_ cause your application to shut down
immediately, as I previously attempted to explain [1].
Try my example script with the following modification:
on quit
display dialog "Bye!" buttons {"OK"}
set _stop to true
continue quit
end quit
Save it as an applet (it doesn't matter which sort), run it and see what
happens. Next, comment out the 'continue quit', save, and run it again. As
you'll see, 'continue quit' does work. More importantly, you should realise
why it's necessary to include it whenever you intercept the 'quit' event.
Let us know if this stuff finally clicks for you. (I'm not sure what I can
say to explain it any better, but I'll give it another try if you're still
unsure.)
Cheers,
has (the king of "just managing to wing it")
[1] Though obviously not well enough. Ah fooey; back to the ol' drawing
board... :p
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.