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: Sat, 15 Sep 2001 08:42:28 -0400
On Sat, 15 Sep 2001 08:04:55 -0400, Victor Yee wrote,
>
Was thinking about this and I believe that there is an implicit "get" involved here.
This seems to work:
on theHandler()
local theList
set theList to {1, 2, 3}
set listRef to a reference to (get theList)
set first item of listRef to 9
return {theList, contents of listRef}
end theHandler
theHandler()
--> {{9, 2, 3}, {9, 2, 3}}
Victor