• 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: Sun, 16 Sep 2001 10:27:29 -0400

This seems a little strange:
--
on test()
set testRec to {testVar:{1}}

set refA to a reference to testVar of testRec
set refB to a reference to testVar of (get testRec)
set refC to a reference to (get testVar of testRec)

set end of refA to 2
set end of refB to 3
set end of refC to 4

set end of refA's contents to 5
set end of refB's contents to 6
set end of refC's contents to 7

{testRec, refA, refB, refC}
end test

test()
--
results:
testRec --> {testVar:{1, 2, 3, 4, 5, 6}}
refA --> testVar of {testVar:{1, 2, 3, 4, 5, 6}}
refB --> testVar of {testVar:{1, 2, 3, 4, 5, 6}}
refC --> {1, 2, 3, 4, 5, 6}

What happened to the 7?

Victor


  • Prev by Date: Where is the Finder Dictionary?
  • Next by Date: Also in Smile no dictionary.
  • 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