View Single Post
  #11  
Old 04-11-2007, 11:04 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Inverness View Post
Now here is the problem:
PHP Code:
---------
object1.var = {object3object4};
object2.var = object1.var;
//Objects are lost
---------
object1.var = {object3object4};
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.obj3temp.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.
__________________
Skyld
Reply With Quote