• 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: "Mark J. Reed" <email@hidden>
  • Date: Mon, 7 Jan 2008 10:18:59 -0500

Here's my understanding:

The difference with references lies in where the work gets done -
inside the Applescript interpreter, or inside the application you're
talking to.  A reference is like a receipt that lets you go pick
something up at the service counter that you couldn't carry yourself.
  It's more a label than an object, and not useful to the AS
interpreter by itself.  It's not really a pointer, since it lives in a
different process space than what it points to.

So you ask an app for a ref and it returns a ref.  Great.  But if you
then try to do something with that ref outside the app, it doesn't
work: you have to dereference it.  The command "get" does that, and
*poof*! Now you have an object.

BUT that object may be of a class defined by the application, in which
case AppleScript still can't do anything *useful* to it.  You've
cashed in the receipt and gotten an actual box of stuff, but without
the instruction manual...

Which is what happened in Michelle's case.  When she got the actual
objects, she wasn't able to access the application-specific properites
of those objects, because AS was trying to do it all on its lonesome.
But when she only had references, AS knew it had to go back and talk
to the application, which knows how to access those properties.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: "a reference to"
      • From: Luther Fuller <email@hidden>
References: 
 >"a reference to" (From: Michelle Steiner <email@hidden>)
 >Re: "a reference to" (From: has <email@hidden>)

  • Prev by Date: Re: "a reference to"
  • Next by Date: Re: "a reference to"
  • Previous by thread: Re: "a reference to"
  • Next by thread: Re: "a reference to"
  • Index(es):
    • Date
    • Thread