[flexcoders] Setting variables... confusion over scope, ref/val etc.

2007-01-31 Thread jamiebadman
I'm getting really confused here! This is what's happening... I have an arrayCollection on the 'model' and also an arrayCollection in a local function (the result function in a 'command' module which is fired on return from a web service). So I'm using this local arrayCollection to build up

Re: [flexcoders] Setting variables... confusion over scope, ref/val etc.

2007-01-31 Thread Ralf Bokelberg
Hi Jamie The following two simple rules might be helpful: 1. Objects and Arrays are always references (in contrast to numbers, bools and strings, which are always values) 2. Objects and Arrays exist as long, as a reference to it exits. If you want to add copies of an Object to a collection, you