View Single Post
  #2  
Old 01-28-2012, 08:26 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You have to create a TStaticVar then assign it a variable. I.e:

PHP Code:
function onCreated() { 
  
temp.obj2 test(); 
  echo(
temp.obj2.hello);
  
temp.obj2.destroy();
  
  
// this also works
  
echo(test().hello);


function 
test() {
  
temp.obj = new TStaticVar();
  
temp.obj.hello "world"
  return 
temp.obj

You can write some neat looking code when you return object references.
__________________
Quote:
Reply With Quote