Package: | Global |
Defined In: | Ext-more.js, Ext.js |
Class: | Function |
Extends: | Object |
Method | Defined By | |
---|---|---|
createCallback()
:
Function Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
Call directly on any function. Example: ... Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
Call directly on any function. Example: myFunction.createCallback(arg1, arg2)
Will create a function that is bound to those 2 args. If a specific scope is required in the
callback, use createDelegate instead. The function returned by createCallback always
executes in the window scope.
This method is required when you want to pass arguments to a callback function. If no arguments are needed, you can simply pass a reference to the function as a callback (e.g., callback: myFn). However, if you tried to pass a function with arguments (e.g., callback: myFn(arg1, arg2)) the function would simply execute immediately when the code is parsed. Example usage:
Parameters:
| Function | |
createDelegate( [Object scope ], [Array args ], [Boolean/Number appendArgs ] )
:
FunctionCreates a delegate (callback) that sets the scope to obj.
Call directly on any function. Example: this.myFunction.cre... Creates a delegate (callback) that sets the scope to obj.
Call directly on any function. Example: this.myFunction.createDelegate(this, [arg1, arg2])
Will create a function that is automatically scoped to obj so that the this variable inside the
callback points to obj. Example usage:
Parameters:
| Function | |
createInterceptor( Function fcn , [Object scope ] )
:
FunctionCreates an interceptor function. The passed function is called before the original one. If it returns false,
the orig... Creates an interceptor function. The passed function is called before the original one. If it returns false,
the original one is not called. The resulting function returns the results of the original function.
The passed function is called with the parameters of the original function. Example usage:
Parameters:
| Function | |
createSequence( Function fcn , [Object scope ] )
:
FunctionCreate a combined function call sequence of the original function + the passed function.
The resulting function retur... Create a combined function call sequence of the original function + the passed function.
The resulting function returns the results of the original function.
The passed fcn is called with the parameters of the original function. Example usage:
Parameters:
| Function | |
defer( Number millis , [Object scope ], [Array args ], [Boolean/Number appendArgs ] )
:
NumberCalls this function after the number of millseconds specified, optionally in a specific scope. Example usage:
var say... Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage:
Parameters:
| Function |