• 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: Creating list references in handlers. Bad code or bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating list references in handlers. Bad code or bug?


  • Subject: Re: Creating list references in handlers. Bad code or bug?
  • From: Victor Yee <email@hidden>
  • Date: Sat, 15 Sep 2001 10:29:56 -0400

Ok, I should have done this first. This seems to put a perspective on the level of referencing here:

on theHandler()
local theData, refA, refB

set theData to {theList:{"unchanged!"}}

set refA to a reference to (get theList of theData)

set refB to a reference to theList of theData

set item 1 of contents of refB to "changed!"

return {refA, refB}
end theHandler

theHandler()

--> {{"changed!"}, theList of {theList:{"changed!"}}}

There does seem to be data sharing involved with both references. But it looks as if the type of references are different.

Victor


  • Prev by Date: Pictures
  • Next by Date: Re: Creating list references in handlers. Bad code or bug?
  • Previous by thread: Re: Creating list references in handlers. Bad code or bug?
  • Next by thread: Re: Creating list references in handlers. Bad code or bug?
  • Index(es):
    • Date
    • Thread