Re: max script size
Re: max script size
- Subject: Re: max script size
- From: has <email@hidden>
- Date: Fri, 21 Mar 2003 01:31:33 +0000
Martin Crisp wrote:
>> If the subscripts needed to refer to properties of the main script
then they needed to refer to 'theProperty of current application'.
>
> Most solid approach I've found is to pass the main script into the
> subscript, either as an extra parameter to the handlers that use it,
or in a separate operation, stuffing it into a property in the
> subscript where it can be referenced by the subscript's handlers.
While it wasn't much different to 'mucking with globals' the
problem was rather obviously divisible into chunks. The degree of
ratiness it did have (at that level, at least) was largely due to
my failure to get sub-sub-scripts happening.
Easiest is to start with static-bindings in each script that needs them:
property someModule : load script (alias "path to someModule")
...
set foo to someModule's doSomething(bar)
If you want dynamic bindings, you can always add it in later. I'd
suggest ASLoader [see my site] as a relatively painless solution for
managing your dependencies, but it's still pretty rough and the
documentation currently honks; for brave scripters only.
has
--
http://www.barple.pwp.blueyonder.co.uk -- The Little Page of AppleScripts
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.