Quote:
Originally Posted by Inverness
Now here is the problem:
PHP Code:
--------- object1.var = {object3, object4}; object2.var = object1.var; //Objects are lost --------- object1.var = {object3, object4}; object2.var = new [object1.var.size()]; object2.var[0] = object1.var[0]; object2.var[1] = object1.var[1]; //Objects are saved
|
Please drop the attitude, we are trying to help.
I'm not sure if I've misunderstood where the problem is, but I cannot seem to reproduce this, since the example below is working fine. Is this where your error is occuring?
PHP Code:
function onCreated()
{
temp.obj1 = new TStaticVar();
temp.obj2 = new TStaticVar();
temp.obj3 = new TStaticVar();
temp.obj4 = new TStaticVar();
temp.obj3.var = "YOU HAVE FAILED TO WATER YOUR CHIA PET";
temp.obj1.foo = {temp.obj3, temp.obj4};
temp.obj2.foo = temp.obj1.foo;
echo(temp.obj1.foo[0].type()); // producing 2
echo(temp.obj2.foo[0].type()); // producing 2
echo(temp.obj2.foo[0].var); // producing "YOU HAVE FAILED TO WATER YOUR CHIA PET"
}
It might be good if you can post some real data from your system that is not copying across properly; if it's a bug then it would be easier to find out how it's happening.