• 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: Ed Stockly <email@hidden>
  • Date: Wed, 23 Jan 2008 07:26:29 -0800


Here's the example again:


set theList to {{foo:"foo"}}

repeat with itemRef in theList


    set recordRef to (contents of itemRef)

    set foo of recordRef to "ref"

    set localItem to (contents of recordRef)

    set foo of localItem to "local"

    return {itemRef, recordRef, localItem}


end repeat


--> {item 1 of {{foo:"ref"}}, {foo:"ref"}, {foo:"local"}}



I think this is a bug. I was mistaken when, in an earlier post, I said Script Debugger correctly indicated what was a reference and what was an object.

In the above example, SD does not indicate the variable recordRef a reference, but it clearly is. (SD does show itemRef is a reference).

ASLG indicates that contents can be used to dereference an object, but that doesn't seem to be the case, so I think that's a bug.

I suggest using "as item" rather than "contents of"

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: [Fwd] Offer: I’ll write a script for you
  • Next by Date: Re: How to parse CSV
  • Previous by thread: Re: "a reference to"
  • Next by thread: RE: "a reference to"
  • Index(es):
    • Date
    • Thread