Re: Script Menu in Tiger: non-persistent property bug?
Re: Script Menu in Tiger: non-persistent property bug?
- Subject: Re: Script Menu in Tiger: non-persistent property bug?
- From: Matt Neuburg <email@hidden>
- Date: Wed, 10 Aug 2005 09:25:45 -0700
On Sun, 7 Aug 2005 13:06:05 +0100, kai <email@hidden> said:
>One thing was puzzling me particularly: When run from the Script
>Menu, some scripts were retaining changed properties - while others
>weren't. All scripts worked as expected when run as an application,
>or from Script Editor - but not (in every case) from the Script Menu.
>
>After much digging (not to mention some head-banging), I believe that
>I may have identified the differentiating factor between those
>scripts that work correctly and those that don't. If the script
>returns a value (almost any value, as far as I can tell), then
>changed properties will persist. However, if the script's final
>operation doesn't return a value, it's a rather different story.
Wow. Kai, this is really good work. Bravo.
And here I always thought (and my book documents) that persistence simply
doesn't work in Apple's Script menu. But now it turns out that it *can* be
made to work.
The reason I always thought it didn't work is that my test was always a
display dialog of a property. That isn't enough to get the persistence to
happen.
Now I'm going to have to go back and test all the *other* places where I say
persistence doesn't work.
By the way, it does work in applets and in FastScripts menu.
I still think my book is right to say, however, that persistence is a
problem because it is implemented in a troublesomely inconsistent way,
working only in some milieus and not in others. The worst offender is of
course the Script Editor itself which now strips persistent information when
you open a script for editing (even if you don't change the script). It
didn't do this back on OS 9 and before. (And Script Debugger still doesn't.)
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden