I did testing with .link() awhile back and was rather unsatisfied with the results I got.
HTML Code:
this.var = 4;
temp.var = this.var.link();
temp.var++;
echo("temp.var - " @ temp.var @ " this.var - " @ this.var);
Outputs: temp.var - 5 this.var - 4
HTML Code:
function onCreated()
{
this.var = 1;
getVar()++; // Works
temp.var = getVar();
temp.var++;
echo("temp.var - " @ temp.var @ " this.var - " @ this.var);
}
function getVar()
{
return this.var.link();
}
Outputs: temp.var - 3 this.var - 2