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: "Mark J. Reed" <email@hidden>
- Date: Sun, 7 Aug 2005 18:32:13 -0400
To add another data point, I'm seeing the same behavior as kai when I
save it as a script. if I save it as an app, then the value persists
just fine.
Full version disclosure: I'm running 10.4.2; I bought the Mac during
the TIger release weekend, and it came with 10.3 preinstalled but 10.4
on a CD, so I did an upgrade with the CD. Software Update took it up
to 10.4.2 when it became available.
On 8/7/05, kai <email@hidden> wrote:
> Just having a great time wading through some old scripts that broke
> in my last upgrade... ;-)
>
> 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.
>
> If I'm right, then there's an obvious workaround (simply get the
> affected scripts to return a dummy final value). However, since this
> seems to be a bug, I wondered if any of you guys could shed a little
> more light on it - namely:
>
> 1) Has this behaviour already been identified/reported (to your
> knowledge)?
>
> 2) If not, can you replicate it on your machine (or is it just mine
> that's gone gaga)?
>
> To demonstrate the problem, I've distilled it down to the following
> snippet:
>
> --------------
>
> property n : 1
> display dialog "Test #" & n
> set n to n + 1
> if n < 4 then n
>
> --------------
>
> This should be saved as a compiled script and then run more than 3
> times from the Script Menu. The first 3 runs are successful here,
> incrementing the value of the property (n) each time. After that, the
> dialog sticks on "Test #3" (since, from the third run, the
> conditional statement returns no value).
>
> For the record, I'm testing in OS 10.4.2 / AS1.10 (system upgrade,
> not clean install).
>
> Thanks for any insight you might be able to offer...
>
> ---
> kai
>
>
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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