dannyy
07-10-2007, 11:48 AM
Hi,
Is the function Function.apply(context, arguments) really supported in OpenLaszlo 4.0 or above? The appendix of the developer guide says this function is not supported in OpenLaszlo. However, the LzUnit code, lzunit.lzx, does use this function:
<method name="run" args="theTestResult, theTestName">
....
inrsw = true;
rsw.apply(this, argument);
.....
</method>
I tried the following test code, and it worked as well. Both someOtherObject and testArgument were displayed correctly.
var f = function(a){
Debug.write("current context: ", this);
Debug.write("argument: ", a);
}
f.apply(someOtherObject, testArgument);
Thanks,
Danny
Is the function Function.apply(context, arguments) really supported in OpenLaszlo 4.0 or above? The appendix of the developer guide says this function is not supported in OpenLaszlo. However, the LzUnit code, lzunit.lzx, does use this function:
<method name="run" args="theTestResult, theTestName">
....
inrsw = true;
rsw.apply(this, argument);
.....
</method>
I tried the following test code, and it worked as well. Both someOtherObject and testArgument were displayed correctly.
var f = function(a){
Debug.write("current context: ", this);
Debug.write("argument: ", a);
}
f.apply(someOtherObject, testArgument);
Thanks,
Danny