• 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: Newbie Question: Script Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Question: Script Objects


  • Subject: Re: Newbie Question: Script Objects
  • From: John W Baxter <email@hidden>
  • Date: Sun, 16 Feb 2003 21:04:37 -0800
  • Envelope-to: email@hidden

At 0:22 +0000 2/17/2003, Simon Brown wrote:
>I don't understand why AS can 'look ahead' for handlers but not for script
>objects.

I'll take a stab at it (Chris or Chris or... may well ride in with a
better--or correct--answer):

It's fairly easy to look ahead lexically for a variable...once xxx has
become the name of a variable, it remains the name of that variable.

However, once a variable yyy contains a script object, it doesn't
necessarily remain a script object, and AppleScript can't (easily--or at
all in the presence of a run script) tell at compile time whether yyy will
refer to a script object at arbitrarily points in the code.

This is, roughly, the minimal example in which it doesn't remain a script
object:

script yyy
end script

set yyy to 5

display dialog yyy
--(displays 5)

--John

--
John Baxter email@hidden Port Ludlow, WA, USA
_______________________________________________
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.

References: 
 >Re: Newbie Question: Script Objects (From: Simon Brown <email@hidden>)

  • Prev by Date: Print Center
  • Next by Date: network time server scripting/syntax
  • Previous by thread: Re: Newbie Question: Script Objects
  • Next by thread: Re: Newbie Question: Script Objects
  • Index(es):
    • Date
    • Thread