Re: BUG: Store script Perversity - it's the Quit handler!
Re: BUG: Store script Perversity - it's the Quit handler!
- Subject: Re: BUG: Store script Perversity - it's the Quit handler!
- From: Paul Berkowitz <email@hidden>
- Date: Sat, 28 Dec 2002 19:21:51 -0800
On 12/28/02 6:53 PM, "Jon Pugh" <email@hidden> wrote:
>
> It's that 'continue quit' which is putting the whole main script into the
>
> updaterScript somehow.
>
>
It still sounds like simple resource file confusion. However, this could be a
>
case where the "store script" command leaves its resource file open as the
>
default, so that when the script application (aka the applet shell) stores its
>
script resource into the default file, it ends up in the wrong one.
That is exactly what it sounds like it's doing.
>
>
Do you have any kind of "open" command which needs a corresponding "close"
>
command, especially related to resources?
Nope. Is there some sort of command that you can follow 'store script' with
that says 'and stay stored, damn you'?
The problem does not arise without both the 'store script _and_ the quit
handler. With only one of those, there's no problem. (I.e. without 'store
script', the main script stores its own properties in its own shell
correctly. Without the quit handler, both scripts get saved correctly.) 'on
quit' must interrupt the normal process where the script stores its own
resource into the default file, and then when it goes back to where its was
(which is all the 'continue quit' apparently does) - in this case finishing
the last called handler and the run handler, since it's all over - and then
really quits, that's where it gets confused and stores its own resource in
the updaterScriptFile instead of into its own shell.
Thank for your thoughts. My workaround is not to load and store
updaterScript at all, and to let the user make an educated guess as to the
time the main script last ran, if he ever needs to. This whole thing is a
little refinement that will rarely be needed. It would be nicer, though.
--
Paul Berkowitz
_______________________________________________
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.