• 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: *Very* strange script / global variable behavior
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: *Very* strange script / global variable behavior


  • Subject: Re: *Very* strange script / global variable behavior
  • From: has <email@hidden>
  • Date: Mon, 28 Feb 2005 22:38:44 +0000

Nigel Garvey wrote:

>And this script object, being the top-level script
object, is created at compile-time; ergo the script object in Outer
is also created at compile-time.

Not according to ASLG, but maybe you have a better source:

The ASLG is mostly incorrect. A named script object declared within another script object is initialised when the parent script object is initialised, same as property values and handler objects. Only unnamed script objects and script objects within declared handlers are initialised when the relevant code is executed. Simple demonstration showing when initialisation occurs:


on x(s)
display dialog s & " initialised"
end x
script
property a : x("unnamed script")
end script


    script o1
        property b : x("script o1")
        script o2
            property c : x("script o2")
        end script
    end script

This displays "script o1 initialised" and "script o2 initialised" when the script is compiled, and "unnamed script initialised" when run.

HTH

has
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
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: *Very* strange script / global variable behavior
      • From: Neil Faiman <email@hidden>
  • Prev by Date: Re: Re: Converting 'file:/' URL to MacOS path name...
  • Next by Date: Re: What is this?
  • Previous by thread: Re: *Very* strange script / global variable behavior
  • Next by thread: Re: *Very* strange script / global variable behavior
  • Index(es):
    • Date
    • Thread