| createCallback()
- :
- FunctionCreates a callback that passes arguments[0], arguments[1], arguments[2], ...
+ These functions are available on every Function object (any JavaScript function). Public PropertiesThis class has no public properties. Public Methods|
| createCallback()
+ :
+ FunctionCreates 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
@@ -19,9 +19,9 @@ would simply execute immediately when the code is parsed. Example usage:
text: 'Say Hi',
renderTo: Ext.getBody(),
handler: sayHi.createCallback('Fred')
-}); | Function | | createDelegate( [Object scope ], [Array args ], [Boolean/Number appendArgs ] )
- :
- FunctionCreates a delegate (callback) that sets the scope to obj.
+}); | 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
@@ -44,9 +44,9 @@ callback points to obj. Example usage:
// "Hi, Fred. You clicked the "Say Hi" button."
btn.on( 'click', sayHi.createDelegate(btn, [ 'Fred'])); Parameters:scope : Object(optional) The scope (this reference) in which the function is executed.
If omitted, defaults to the browser window. args : Array(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller) appendArgs : Boolean/Number(optional) if True args are appended to call args instead of overriding,
-if a number the args are inserted at the specified position Returns: | Function | | createInterceptor( Function fcn , [Object scope ] )
- :
- FunctionCreates an interceptor function. The passed function is called before the original one. If it returns false,
+if a number the args are inserted at the specified position Returns: | 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:
@@ -64,9 +64,9 @@ sayHi( 'Fred'); // alerts "Hi, Fred"
sayHiToFriend( 'Fred'); // no alert
sayHiToFriend( 'Brian'); // alerts "Hi, Brian"Parameters:fcn : FunctionThe function to call before the original scope : Object(optional) The scope (this reference) in which the passed function is executed.
-If omitted, defaults to the scope in which the original function is called or the browser window. Returns: | Function | | createSequence( Function fcn , [Object scope ] )
- :
- FunctionCreate a combined function call sequence of the original function + the passed function.
+If omitted, defaults to the scope in which the original function is called or the browser window. Returns: | 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:
@@ -81,9 +81,9 @@ sayHi( 'Fred'); // alerts "Hi, Fred"
});
sayGoodbye( 'Fred'); // both alerts show | 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:
+If omitted, defaults to the scope in which the original function is called or the browser window. Returns: | 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:
var sayHi = function(name){
alert('Hi, ' + name);
|
|