Package: | Ext.util |
Defined In: | Function.js |
Class: | Functions |
Extends: | Object |
Method | Defined By | |
---|---|---|
createDelegate( Function fn , [Object scope ], [Array args ], [Boolean/Number appendArgs ] )
:
FunctionCreates a delegate (callback) that sets the scope to obj.
Call directly on any function. Example: Ext.createDelegate(... Creates a delegate (callback) that sets the scope to obj.
Call directly on any function. Example: Ext.createDelegate(this.myFunction, 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:
| Functions | |
createInterceptor( Function origFn , Function newFn , [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:
| Functions | |
createSequence( Function origFn , Function newFn , [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:
var sayHi = function(name){
alert('Hi, ' + name);
}
sayHi('Fred'); // alerts "Hi, Fred"
var sayGoodbye = Ext.createSequence(sayHi, function(name){
alert('Bye, ' + name);
});
sayGoodbye('Fred'); // both alerts show Parameters:
| Functions | |
defer( Function fn , 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:
| Functions |