• 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: Scope of globals, parents and children, "load script" an
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scope of globals, parents and children, "load script" an


  • Subject: Re: Scope of globals, parents and children, "load script" an
  • From: Sander Tekelenburg <email@hidden>
  • Date: Sun, 20 May 2001 06:10:32 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 02:52 -0400 UTC, on 18/05/2001, email@hidden wrote:

> On Thu, 17 May 2001 05:21:06 +0200, Sander Tekelenburg
> <email@hidden> asked,
>
>> I'm trying to reorganize a rather large script (1000+ lines and growing)
>> by separating it into a main script (parent) and moving all handlers into
>> a separate script library (child) that is called by the main script with
>> the "load script" command.

[...]

> Taking a step back from the problem, it looks like you need to group your
> handlers and the data they manipulate into script objects, rather than just
> grouping the handlers into a library and ignoring the data.

Hm... This sounds interesting. Made me dive into the "Script Objects" chapter
of the AppleScript Language Guide, which is mostly incomprehensible though :(
I did run into one specific thing though: on page 331, under "Definining
Inheritance", it says:

You specify inheritance with the Parent property. A script object that
includes a Parent property inherits the properties and handlers of the
script object listed in the Parent property.

That seems to say there is a way to make the child use the globals of the
parent, but I still don't see how to exactly use this. The Guide doesn't give
any examples :(


Btw, isn't my child script (which is only a bunch of handlers in my current
version) an implicit "script object" (when I load it into the main script
through a "load script" command)?


-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBOwdDresywKfXgqKdEQLw8QCgxB4Yl1DnVWMIZi9G+ZQZ9o1zFKMAoOIU
OQZemX90VFG3cqNwYRJoWTYd
=D8FW
-----END PGP SIGNATURE-----
--
Sander Tekelenburg, <http://www.euronet.nl/~tekelenb/>

Mac user: "Macs only have 40 viruses, tops!"
PC user: "SEE! Not even the virus writers support Macs!"


References: 
 >Re: Scope of globals, parents and children, "load script" an (From: email@hidden)

  • Prev by Date: Re: Running Stay-open scripts from the command line
  • Next by Date: Re: Scope of globals, parents and children, "load script" and all that jazz
  • Previous by thread: Re: Scope of globals, parents and children, "load script" an
  • Next by thread: Re: Scope of globals, parents and children, "load script" an
  • Index(es):
    • Date
    • Thread