X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/output/Ext.util.DelayedTask.js diff --git a/docs/output/Ext.util.DelayedTask.js b/docs/output/Ext.util.DelayedTask.js index b44ff5fc..7b3f9dc9 100644 --- a/docs/output/Ext.util.DelayedTask.js +++ b/docs/output/Ext.util.DelayedTask.js @@ -1,151 +1,168 @@ Ext.data.JsonP.Ext_util_DelayedTask({ - "tagname": "class", - "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\n

This 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\n

Usage

\n\n
var 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\n

Note 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.

\n", - "extends": null, - "mixins": [ - - ], - "alternateClassNames": [ + "allMixins": [ ], - "xtype": null, - "author": null, + "deprecated": null, "docauthor": null, - "singleton": false, - "private": false, - "cfg": [ + "members": { + "cfg": [ - ], - "method": [ - { - "tagname": "method", - "name": "DelayedTask", - "member": "Ext.util.DelayedTask", - "doc": "

The parameters to this constructor serve as defaults and are not required.

\n", - "params": [ - { - "type": "Function", - "name": "fn", - "doc": "

(optional) The default function to call.

\n", - "optional": true - }, - { + ], + "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.

\n", + "name": "scope" + }, + { + "type": "Array", + "optional": true, + "doc": "

(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", - "name": "scope", - "doc": "

The default scope (The this reference) in which the\nfunction is called. If not specified, this will refer to the browser window.

\n", - "optional": false + "doc": "\n" }, - { - "type": "Array", - "name": "args", - "doc": "

(optional) The default Array of arguments.

\n", - "optional": true - } - ], - "return": { - "type": "void", - "doc": "\n" + "linenr": 1 }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/util/DelayedTask.js", - "linenr": 1, - "html_filename": "DelayedTask.html", - "href": "DelayedTask.html#Ext-util-DelayedTask-method-constructor", - "shortDoc": "

The parameters to this constructor serve as defaults and are not required.

\n" - }, - { - "tagname": "method", - "name": "cancel", - "member": "Ext.util.DelayedTask", - "doc": "

Cancel the last queued timeout

\n", - "params": [ + { + "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": [ - ], - "return": { - "type": "void", - "doc": "\n" - }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/util/DelayedTask.js", - "linenr": 62, - "html_filename": "DelayedTask.html", - "href": "DelayedTask.html#Ext-util-DelayedTask-method-cancel", - "shortDoc": "

Cancel the last queued timeout

\n" - }, - { - "tagname": "method", - "name": "delay", - "member": "Ext.util.DelayedTask", - "doc": "

Cancels any pending timeout and queues a new one

\n", - "params": [ - { - "type": "Number", - "name": "delay", - "doc": "

The milliseconds to delay

\n", - "optional": false - }, - { - "type": "Function", - "name": "newFn", - "doc": "

(optional) Overrides function passed to constructor

\n", - "optional": true + ], + "name": "cancel", + "owner": "Ext.util.DelayedTask", + "doc": "

Cancel the last queued timeout

\n", + "linenr": 62, + "return": { + "type": "void", + "doc": "\n" }, - { - "type": "Object", - "name": "newScope", - "doc": "

(optional) Overrides scope passed to constructor. Remember that if no scope\nis specified, this will refer to the browser window.

\n", - "optional": true - }, - { - "type": "Array", - "name": "newArgs", - "doc": "

(optional) Overrides args passed to constructor

\n", - "optional": true - } - ], - "return": { - "type": "void", - "doc": "\n" + "html_filename": "DelayedTask.html" }, - "private": false, - "static": false, - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/util/DelayedTask.js", - "linenr": 46, - "html_filename": "DelayedTask.html", - "href": "DelayedTask.html#Ext-util-DelayedTask-method-delay", - "shortDoc": "

Cancels any pending timeout and queues a new one

\n" - } - ], - "property": [ + { + "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.

\n", + "name": "newScope" + }, + { + "type": "Array", + "optional": true, + "doc": "

(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": [ - ], - "event": [ + ], + "cssVar": [ - ], - "filename": "/Users/nick/Projects/sencha/SDK/platform/core/src/util/DelayedTask.js", - "linenr": 1, - "html_filename": "DelayedTask.html", - "href": "DelayedTask.html#Ext-util-DelayedTask", - "cssVar": [ + ], + "cssMixin": [ - ], - "cssMixin": [ + ], + "event": [ - ], - "component": false, + ] + }, + "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\n

This 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\n

Usage

\n\n
var 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\n

Note 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.

\n", "mixedInto": [ ], - "allMixins": [ + "linenr": 1, + "xtypes": [ - ] + ], + "html_filename": "DelayedTask.html", + "extends": null }); \ No newline at end of file