X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/output/Ext.util.DelayedTask.js diff --git a/docs/output/Ext.util.DelayedTask.js b/docs/output/Ext.util.DelayedTask.js index 7b3f9dc9..f937ed8d 100644 --- a/docs/output/Ext.util.DelayedTask.js +++ b/docs/output/Ext.util.DelayedTask.js @@ -1,168 +1 @@ -Ext.data.JsonP.Ext_util_DelayedTask({ - "allMixins": [ - - ], - "deprecated": null, - "docauthor": null, - "members": { - "cfg": [ - - ], - "method": [ - { - "deprecated": null, - "alias": null, - "href": "DelayedTask.html#Ext-util-DelayedTask-method-constructor", - "tagname": "method", - "protected": false, - "shortDoc": "The parameters to this constructor serve as defaults and are not required. ...", - "static": false, - "params": [ - { - "type": "Function", - "optional": true, - "doc": "
(optional) The default function to call.
\n", - "name": "fn" - }, - { - "type": "Object", - "optional": true, - "doc": "(optional) The default scope (The this
reference) in which the\nfunction is called. If not specified, this
will refer to the browser window.
(optional) The default Array of arguments.
\n", - "name": "args" - } - ], - "private": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/DelayedTask.js", - "doc": "The parameters to this constructor serve as defaults and are not required.
\n", - "owner": "Ext.util.DelayedTask", - "name": "DelayedTask", - "html_filename": "DelayedTask.html", - "return": { - "type": "Object", - "doc": "\n" - }, - "linenr": 1 - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "DelayedTask.html#Ext-util-DelayedTask-method-cancel", - "shortDoc": "Cancel the last queued timeout ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/DelayedTask.js", - "private": false, - "params": [ - - ], - "name": "cancel", - "owner": "Ext.util.DelayedTask", - "doc": "Cancel the last queued timeout
\n", - "linenr": 62, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "DelayedTask.html" - }, - { - "deprecated": null, - "alias": null, - "protected": false, - "tagname": "method", - "href": "DelayedTask.html#Ext-util-DelayedTask-method-delay", - "shortDoc": "Cancels any pending timeout and queues a new one ...", - "static": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/DelayedTask.js", - "private": false, - "params": [ - { - "type": "Number", - "optional": false, - "doc": "The milliseconds to delay
\n", - "name": "delay" - }, - { - "type": "Function", - "optional": true, - "doc": "(optional) Overrides function passed to constructor
\n", - "name": "newFn" - }, - { - "type": "Object", - "optional": true, - "doc": "(optional) Overrides scope passed to constructor. Remember that if no scope\nis specified, this
will refer to the browser window.
(optional) Overrides args passed to constructor
\n", - "name": "newArgs" - } - ], - "name": "delay", - "owner": "Ext.util.DelayedTask", - "doc": "Cancels any pending timeout and queues a new one
\n", - "linenr": 46, - "return": { - "type": "void", - "doc": "\n" - }, - "html_filename": "DelayedTask.html" - } - ], - "property": [ - - ], - "cssVar": [ - - ], - "cssMixin": [ - - ], - "event": [ - - ] - }, - "singleton": false, - "alias": null, - "superclasses": [ - - ], - "protected": false, - "tagname": "class", - "mixins": [ - - ], - "href": "DelayedTask.html#Ext-util-DelayedTask", - "subclasses": [ - - ], - "static": false, - "author": null, - "component": false, - "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/util/DelayedTask.js", - "private": false, - "alternateClassNames": [ - - ], - "name": "Ext.util.DelayedTask", - "doc": "The DelayedTask class provides a convenient way to \"buffer\" the execution of a method,\nperforming setTimeout where a new timeout cancels the old timeout. When called, the\ntask will wait the specified time period before executing. If durng that time period,\nthe task is called again, the original call will be cancelled. This continues so that\nthe function is only called a single time for each iteration.
\n\nThis method is especially useful for things like detecting whether a user has finished\ntyping in a text field. An example would be performing validation on a keypress. You can\nuse this class to buffer the keypress events for a certain number of milliseconds, and\nperform only if they stop for that amount of time.
\n\nvar task = new Ext.util.DelayedTask(function(){\n alert(Ext.getDom('myInputField').value.length);\n});\n\n// Wait 500ms before calling our function. If the user presses another key\n// during that 500ms, it will be cancelled and we'll wait another 500ms.\nExt.get('myInputField').on('keypress', function(){\n task.delay(500);\n});\n
\n\nNote that we are using a DelayedTask here to illustrate a point. The configuration\noption buffer
for addListener/on will\nalso setup a delayed task for you to buffer events.
Files
The DelayedTask class provides a convenient way to \"buffer\" the execution of a method,\nperforming setTimeout where a new timeout cancels the old timeout. When called, the\ntask will wait the specified time period before executing. If durng that time period,\nthe task is called again, the original call will be cancelled. This continues so that\nthe function is only called a single time for each iteration.
\n\nThis method is especially useful for things like detecting whether a user has finished\ntyping in a text field. An example would be performing validation on a keypress. You can\nuse this class to buffer the keypress events for a certain number of milliseconds, and\nperform only if they stop for that amount of time.
\n\nvar task = new Ext.util.DelayedTask(function(){\n alert(Ext.getDom('myInputField').value.length);\n});\n\n// Wait 500ms before calling our function. If the user presses another key\n// during that 500ms, it will be cancelled and we'll wait another 500ms.\nExt.get('myInputField').on('keypress', function(){\n task.delay(500);\n});\n
\n\nNote that we are using a DelayedTask here to illustrate a point. The configuration\noption buffer
for addListener/on will\nalso setup a delayed task for you to buffer events.
The parameters to this constructor serve as defaults and are not required.
\nThe default function to call. If not specified here, it must be specified during the delay call.
\nThe default scope (The this
reference) in which the\nfunction is called. If not specified, this
will refer to the browser window.
The default Array of arguments.
\nCancels any pending timeout and queues a new one
\nThe milliseconds to delay
\nOverrides function passed to constructor
\nOverrides scope passed to constructor. Remember that if no scope\nis specified, this
will refer to the browser window.
Overrides args passed to constructor
\n