/* This file is part of Ext JS 3.4 Copyright (c) 2011-2013 Sencha Inc Contact: http://www.sencha.com/contact GNU General Public License Usage This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. Build date: 2013-04-03 15:07:25 */ Ext.data.JsonP.Function({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"
Files
These functions are available on every Function object (any JavaScript function).
\nCreates a callback that passes arguments[0], arguments[1], arguments[2], ...\nCall directly on any function. Example: myFunction.createCallback(arg1, arg2)
\nWill create a function that is bound to those 2 args. If a specific scope is required in the\ncallback, use createDelegate instead. The function returned by createCallback always\nexecutes in the window scope.
This method is required when you want to pass arguments to a callback function. If no arguments\nare needed, you can simply pass a reference to the function as a callback (e.g., callback: myFn).\nHowever, if you tried to pass a function with arguments (e.g., callback: myFn(arg1, arg2)) the function\nwould simply execute immediately when the code is parsed. Example usage:\n
var sayHi = function(name){\n alert('Hi, ' + name);\n}\n\n// clicking the button alerts \"Hi, Fred\"\nnew Ext.Button({\n text: 'Say Hi',\n renderTo: Ext.getBody(),\n handler: sayHi.createCallback('Fred')\n});\n
\n\nThe new function
\nCreates a delegate (callback) that sets the scope to obj.\nCall directly on any function. Example: this.myFunction.createDelegate(this, [arg1, arg2])
\nWill create a function that is automatically scoped to obj so that the this variable inside the\ncallback points to obj. Example usage:
var sayHi = function(name){\n // Note this use of \"this.text\" here. This function expects to\n // execute within a scope that contains a text property. In this\n // example, the \"this\" variable is pointing to the btn object that\n // was passed in createDelegate below.\n alert('Hi, ' + name + '. You clicked the \"' + this.text + '\" button.');\n}\n\nvar btn = new Ext.Button({\n text: 'Say Hi',\n renderTo: Ext.getBody()\n});\n\n// This callback will execute in the scope of the\n// button instance. Clicking the button alerts\n// \"Hi, Fred. You clicked the \"Say Hi\" button.\"\nbtn.on('click', sayHi.createDelegate(btn, ['Fred']));\n
\n\nThe scope (this
reference) in which the function is executed.\nIf omitted, defaults to the browser window.
Overrides arguments for the call. (Defaults to the arguments passed by the caller)
\nif True args are appended to call args instead of overriding,\nif a number the args are inserted at the specified position
\nThe new function
\nCreates an interceptor function. The passed function is called before the original one. If it returns false,\nthe original one is not called. The resulting function returns the results of the original function.\nThe passed function is called with the parameters of the original function. Example usage:
\n\nvar sayHi = function(name){\n alert('Hi, ' + name);\n}\n\nsayHi('Fred'); // alerts \"Hi, Fred\"\n\n// create a new function that validates input without\n// directly modifying the original function:\nvar sayHiToFriend = sayHi.createInterceptor(function(name){\n return name == 'Brian';\n});\n\nsayHiToFriend('Fred'); // no alert\nsayHiToFriend('Brian'); // alerts \"Hi, Brian\"\n
\n\nThe function to call before the original
\nThe scope (this
reference) in which the passed function is executed.\nIf omitted, defaults to the scope in which the original function is called or the browser window.
The new function
\nCreate a combined function call sequence of the original function + the passed function.\nThe resulting function returns the results of the original function.\nThe passed fcn is called with the parameters of the original function. Example usage:
\n\nvar sayHi = function(name){\n alert('Hi, ' + name);\n}\n\nsayHi('Fred'); // alerts \"Hi, Fred\"\n\nvar sayGoodbye = sayHi.createSequence(function(name){\n alert('Bye, ' + name);\n});\n\nsayGoodbye('Fred'); // both alerts show\n
\n\nThe function to sequence
\nThe scope (this
reference) in which the passed function is executed.\nIf omitted, defaults to the scope in which the original function is called or the browser window.
The new function
\nCalls this function after the number of millseconds specified, optionally in a specific scope. Example usage:
\n\nvar sayHi = function(name){\n alert('Hi, ' + name);\n}\n\n// executes immediately:\nsayHi('Fred');\n\n// executes after 2 seconds:\nsayHi.defer(2000, this, ['Fred']);\n\n// this syntax is sometimes useful for deferring\n// execution of an anonymous function:\n(function(){\n alert('Anonymous');\n}).defer(100);\n
\n\nThe number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately)
\nThe scope (this
reference) in which the function is executed.\nIf omitted, defaults to the browser window.
Overrides arguments for the call. (Defaults to the arguments passed by the caller)
\nif True args are appended to call args instead of overriding,\nif a number the args are inserted at the specified position
\nThe timeout id that can be used with clearTimeout
\n