ECMAScript | |
---|---|
Object | apply ( Object thisArg, Array argArray ) |
void | bind ( Object thisArg, … ) |
Object | call ( Object thisArg, … ) |
String | toString () |
QtScript | |
void | connect ( Object receiver, String function ) |
void | connect ( Function functionRef ) |
void | disconnect ( Object receiver, String function ) |
void | disconnect ( Function functionRef ) |
DAZ Script | |
void | scriptConnect ( Object receiver, String function ) |
void | scriptConnect ( Function functionRef ) |
void | scriptDisconnect ( Object receiver, String function ) |
void | scriptDisconnect ( Function functionRef ) |
Examples:
function myFunction() { //do something... }
var myFunction = function() { //do something... }
See Also:
An “array-like” object (has a length property and zero-indexed properties like an Array, but none of the other properties/methods of an actual Array) containing values for each argument the function was called with.
Example:
function sum(){ var nTotal = 0; for( var i = 0; i < arguments.length; i += 1 ){ nTotal += arguments[ i ]; } return nTotal; } print( sum( 2, 3, 4, 5 ) ); //14
Holds the number of arguments expected by the function.
Function( String p1, String p2, …, String pn, String body )
Default Constructor. Creates a new function. All arguments are optional - zero or more argument names may be specified, the last argument, if any, is always used as the body of the function.
Parameter(s):
Object : apply( Object thisArg, Array argArray )
Performs a function call with a given this value and argArray
arguments.
Attention:
Parameter(s):
undefined
, or not provided, the global object is used.Return Value:
void : bind( Object thisArg, … )
Creates a new function that, when called, has its this keyword set to thisArg
, with the given sequence of arguments preceding any provided when the new function is called.
Parameter(s):
undefined
, or not provided, the global object is used.Object : call( Object thisArg, … )
Performs a function call with a given this value and optional arguments.
Attention:
Parameter(s):
Return Value:
Return Value:
void : connect( Object receiver, String function )
Deprecated
Exists only to keep old code working. Do not use in new code. Use scriptConnect() instead.
Attention:
receiver
is destroyedvoid : connect( Function functionRef )
Deprecated
Exists only to keep old code working. Do not use in new code. Use scriptConnect() instead.
Attention:
functionRef
is destroyedvoid : disconnect( Object receiver, String function )
Deprecated
Exists only to keep old code working. Do not use in new code. Use scriptDisconnect() instead.
Attention:
void : disconnect( Function functionRef )
Deprecated
Exists only to keep old code working. Do not use in new code. Use scriptDisconnect() instead.
Attention:
void : scriptConnect( Object receiver, String function )
Connects a signal to a function (slot) on another object.
Parameter(s):
receiver
to execute when this signal is emitted.Attention:
receiver
is destroyedSee Also:
Since:
void : scriptConnect( Function functionRef )
Connects a signal to a function
Parameter(s):
Attention:
functionRef
(or the object that provides it) is destroyedSee Also:
Since:
void : scriptDisconnect( Object receiver, String function )
Disconnects a signal from a function (slot) on another object.
Parameter(s):
receiver
to disconnect.Attention:
See Also:
Since:
void : scriptDisconnect( Function functionRef )
Disconnects a signal from a function
Parameter(s):
Attention:
See Also:
Since: