• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script Menu in Tiger: non-persistent property bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Menu in Tiger: non-persistent property bug?


  • Subject: Re: Script Menu in Tiger: non-persistent property bug?
  • From: deivy petrescu <email@hidden>
  • Date: Sun, 7 Aug 2005 10:44:46 -0400


On Aug 7, 2005, at 8:06, kai 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

Kai, I can corroborate that! However, if you wrap this script in a repeat loop, say -- property n : 1 repeat 10 times display dialog "Test #" & n giving up after 1 set n to n + 1 if n < 4 then n end repeat --

it works as expected in SM.


deivy



_______________________________________________
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


  • Follow-Ups:
    • Re: Script Menu in Tiger: non-persistent property bug?
      • From: kai <email@hidden>
References: 
 >Script Menu in Tiger: non-persistent property bug? (From: kai <email@hidden>)

  • Prev by Date: Re: Inheritance and Loaded Libraries
  • Next by Date: Re: [OT] Finder in Tiger: no undo when editing names?
  • Previous by thread: Script Menu in Tiger: non-persistent property bug?
  • Next by thread: Re: Script Menu in Tiger: non-persistent property bug?
  • Index(es):
    • Date
    • Thread