• 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: "Stockly, Ed" <email@hidden>
  • Date: Thu, 17 Jan 2008 12:55:26 -0800
  • Thread-topic: "a reference to"

Any time you execute a

repeat with anItem in aList

AnItem is a reference to the list.

If you don't want a reference you have options. My favorite is below.

repeat with itemRef in theList

    set recordRef to (contents of (itemRef as item))

    --as item removes the reference

    set foo of recordRef to "ref"
    set localItem to (contents of recordRef)
    set foo of localItem to "local"
    return {theList, itemRef, recordRef, localItem}
end repeat
-->> {{{foo:"foo"}}, item 1 of {{foo:"foo"}}, {foo:"ref"}, {foo:"local"}}

HTH,

ES

 _______________________________________________
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

  • Prev by Date: Question on a script
  • 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