Quote:
|
Originally Posted by ApothiX
There is no way to pass them via triggeractions, but I did come up with a little way to avoid that.
To send it:
PHP Code:
temp.object = new TStaticVar();
temp.object.test = "Testing 123";
temp.arrayholder = NULL
for(temp.vname: temp.object.getdynamicvarnames()) {
temp.arrayholder.add(temp.vname @ "=" @ temp.object.(@temp.vname));
}
triggerserver("gui", this.name, "sendobject", temp.arrayholder);
To receive it:
PHP Code:
function onActionServerside() {
if(params[0] == "sendobject") {
temp.object.loadvarsfromarray(params[1]);
echo(temp.object.test);
}
}
|
You know there is a built-in savevarstoarray function
HTML Code:
temp.object = new TStaticVar();
temp.object.test = "test";
temp.object.test.bar = "test2";
temp.arrayholder = temp.object.savevarstoarray(false);
echo(temp.arrayholder) outputs
HTML Code:
scriptlogmissingfunctions=false,timeout=0,joinedclasses=,test=test,test.bar=test2
http://wiki.graal.net/index.php/Crea...lVar#Functions