Bunoon: TESS | Manual | Function

This area contains a set of functions that are used for handling and manipulating functions that have already been created. For example, have you ever wanted a function of your own to be called another one if triggered? Well, now this is all possible using this section of TESS.

Takes a function and creates a reference to it (using 'arguments' as the parameter list).

The main arguments for this function are as follows:

  • oFunction [Object] - The function that should be referenced.
  • [arguments] - An arguments object array containing the list arguments to pass to the function.

The return value for this function is as follows:

  • [Object] - An object containing the function reference (or null if any error has occurred).

Below is an example of how to use this function:

function Reference (oValue) {

alert(oValue);

};


var oFunction = $T.Function.CreateReference(Reference, "Hello");

Takes a function and assigns a call-back to it (the return is the new function to call).

The main arguments for this function are as follows:

  • oFunction [Object] - The function that we want to assigned the call-back to.
  • oCallback [Object] - The function that we want to use for the call-back.

The return value for this function is as follows:

  • [Object] - A new function containing the old and new one for the callback (or null if any error has occurred).

Below is an example of how to use this function:

function TestEvent () {

alert("Event callback.");

};


var oNewFunction = $T.Function.AddCallback(TestEvent, function () { alert("another call"); });