Re: A reference to
Re: A reference to
- Subject: Re: A reference to
- From: Rob Jorgensen <email@hidden>
- Date: Sun, 3 Jun 2001 20:55:03 -0400
On 6/3/01, Michelle Steiner commented:
I haven't used this feature of Applescript because I'm not really sure
what is is and does.
I understand the difference between "set a to b" and "copy b to a" but
don't understand what "set a to a reference to b" does.
Anyone care to explain?
Here's my understanding, for what it's worth.
"a reference to" an object is a pointer to a value, and not a value
itself. For instance, if you:
set a to paragraph 1 of some document
Then "variable a" contains the contents of paragraph 1 at the time
the value of "variable a" was set, even if the contents of paragraph
1 change. If you:
set a to a reference to paragraph 1 of some document
Then "variable a" will always reflect paragraph 1's current content,
no matter how many times paragraph 1 might change while the script is
doing its thing.
So, choosing the correct terminology is dependent on what you need to
do and whether or not the object being targeted by the "reference to"
changes while you are doing it.
I hope/believe this is correct, but just in case it isn't, I've set
aside some space for corrections. Expand as needed. :P
<corrections>
</corrections>
Later,
Rob Jorgensen
Ohio, USA