>put ll
>-- [2, 3, 4, 5] -- (the correct value here is [1, 2, 3, 4, 5] )
>
>Any solution?
Because director uses 'pass by reference' for lists.
use
set newList = duplicate(oldList)
or dot.syntax
newlist = oldList.duplicate()
This is a great feature of director, not a problem, but if you skipped Com
Sci 211, you might not realize what going on.
One of the neatest tricks that you can use this for is when you are passing
messages between sprites that you don't know the location of. If a calling
script has
passList = []
SendAllSprites(#SomeHandler, passList)
and the SomeHandler puts information into passList, then when you return
back from the SAS call, passlist will have that info in it (or nothing if
there are currently no sprites with that handler in them). Great way to
keep things open ended, have 'grouped' sprites find the rest of their group
on beginSprite (and they can all share the same list of objects in the
group, etc.)
roymeo
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]