Re: Inheritance dilemma
Re: Inheritance dilemma
- Subject: Re: Inheritance dilemma
- From: Paul Berkowitz <email@hidden>
- Date: Wed, 23 Apr 2003 13:40:41 -0700
On 4/23/03 12:20 PM, "David Graham" <email@hidden> wrote:
>
On Wednesday, April 23, 2003, at 09:34 AM, Paul Berkowitz wrote:
>
>
> You set the property to whatever you want, then *store script replacing
>
> yes*. Forget about all the parent stuff. You were asking the wrong
>
> question.
>
>
Indeed I was! I didn't realize that I _had_ to store the script if the
>
library was defined as a parent of the current script. The ASLG says
>
that "if a child changes one of its inherited properties, the value of
>
the
>
parent property changes." It appears that the load script makes a copy
>
of the library so the parent refers to the local copy and not the
>
original library file. Did I get that right?
>
'load script' makes a copy in memory, and acts on it (runs it if you use
'run script', calls handlers, sets variables, etc.) in that copy in memory.
That's not exactly "local" - it's got nothing to do with scope - but is
probably what you meant by "local", yes. Think of 'load script' as
_accessing_ the script in the other script file (it doesn't have to be a
library, by the way, it could have a run handler too - it might be applet).
It doesn't alter the original unless you store your newly altered script in
memory back into the file with 'store script'.
--
Paul Berkowitz
_______________________________________________
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.