Re: Creating list references in handlers. Bad code or bug?
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