• 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: A reference to
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >A reference to (From: Michelle Steiner <email@hidden>)

  • Prev by Date: referencing invisible items in the Finder (9.1)
  • Next by Date: Re: Two things I noticed in a simple Finder script
  • Previous by thread: A reference to
  • Next by thread: Re: A reference to
  • Index(es):
    • Date
    • Thread