130 lines
No EOL
7.3 KiB
HTML
130 lines
No EOL
7.3 KiB
HTML
<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
|
<html>
|
|
<head>
|
|
<title>Ext.util.DelayedTask</title>
|
|
<link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
|
|
<link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
|
|
<!-- GC -->
|
|
</head>
|
|
<body>
|
|
<div class="body-wrap">
|
|
<div class="top-tools">
|
|
<img src="../resources/print.gif" width="16" height="16" align="absmiddle"> <a href="Ext.util.DelayedTask.html" target="_blank">Print Friendly</a><br/>
|
|
|
|
</div>
|
|
<h1>Class Ext.util.DelayedTask</h1>
|
|
<table cellspacing="0">
|
|
<tr><td class="label">Package:</td><td>Ext.util</td></tr>
|
|
<tr><td class="label">Class:</td><td>DelayedTask</td></tr>
|
|
<tr><td class="label">Extends:</td><td>Object</td></tr>
|
|
<tr><td class="label">Defined In:</td><td><a href="DelayedTask.jss.html">DelayedTask.js</a></td></tr>
|
|
</table>
|
|
<div class="description">
|
|
Provides a convenient method of performing setTimeout where a new
|
|
timeout cancels the old timeout. An example would be performing validation on a keypress.
|
|
You can use this class to buffer
|
|
the keypress events for a certain number of milliseconds, and perform only if they stop
|
|
for that amount of time. </div>
|
|
<br />
|
|
<a href="#properties">Properties</a>
|
|
- <a href="#methods">Methods</a>
|
|
- <a href="#events">Events</a>
|
|
<hr />
|
|
<a name="properties"></a>
|
|
<h2>Public Properties</h2>
|
|
<div class="no-members">This class has no public properties.</div> <a name="methods"></a>
|
|
<h2>Public Methods</h2>
|
|
<table cellspacing="0" class="member-table">
|
|
<tr>
|
|
<th class="sig-header" colspan="2">Method</th>
|
|
<th class="msource-header">Defined By</th>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#DelayedTask">DelayedTask</a>(<span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Array args</code>]</span>)</td>
|
|
<td class="msource" rowspan="2">DelayedTask</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">The parameters to this constructor serve as defaults and are not required.</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#cancel">cancel</a>() : void</td>
|
|
<td class="msource" rowspan="2">DelayedTask</td>
|
|
</tr>
|
|
<tr class="alt">
|
|
<td class="mdesc">Cancel the last queued timeout</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="micon" rowspan="2"> </td>
|
|
<td class="sig"><a class="mlink" href="#delay">delay</a>(<code>Number delay</code>, <span class="optional" title="Optional">[<code>Function newFn</code>]</span>, <span class="optional" title="Optional">[<code>Object newScope</code>]</span>, <span class="optional" title="Optional">[<code>Array newArgs</code>]</span>) : void</td>
|
|
<td class="msource" rowspan="2">DelayedTask</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="mdesc">Cancels any pending timeout and queues a new one</td>
|
|
</tr>
|
|
</table>
|
|
<a name="events"></a>
|
|
<h2>Public Events</h2>
|
|
<div class="no-members">This class has no public events.</div>
|
|
<a name="DelayedTask"></a>
|
|
<h2 class="mdetail-head">Constructor Details</h2>
|
|
<div class="detail-wrap">
|
|
<div class="mdetail">
|
|
<h3>DelayedTask</i></h3>
|
|
<code>public function DelayedTask(<span class="optional" title="Optional">[<code>Function fn</code>]</span>, <span class="optional" title="Optional">[<code>Object scope</code>]</span>, <span class="optional" title="Optional">[<code>Array args</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
The parameters to this constructor serve as defaults and are not required. <div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>fn</code> : Function<div class="sub-desc">(optional) The default function to timeout</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The default scope of that timeout</div></li><li><code>args</code> : Array<div class="sub-desc">(optional) The default Array of arguments</div></li> </ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<h2 class="mdetail-head">Method Details</h2>
|
|
<div class="detail-wrap">
|
|
<a name="cancel"></a>
|
|
<div class="mdetail">
|
|
<h3>cancel</i></h3>
|
|
<code>public function cancel()</code>
|
|
<div class="mdetail-desc">
|
|
Cancel the last queued timeout
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li>None.</li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DelayedTask.</div>
|
|
</div>
|
|
<a name="delay"></a>
|
|
<div class="mdetail alt">
|
|
<h3>delay</i></h3>
|
|
<code>public function delay(<code>Number delay</code>, <span class="optional" title="Optional">[<code>Function newFn</code>]</span>, <span class="optional" title="Optional">[<code>Object newScope</code>]</span>, <span class="optional" title="Optional">[<code>Array newArgs</code>]</span>)</code>
|
|
<div class="mdetail-desc">
|
|
Cancels any pending timeout and queues a new one
|
|
<div class="mdetail-params">
|
|
<strong>Parameters:</strong>
|
|
<ul><li><code>delay</code> : Number<div class="sub-desc">The milliseconds to delay</div></li><li><code>newFn</code> : Function<div class="sub-desc">(optional) Overrides function passed to constructor</div></li><li><code>newScope</code> : Object<div class="sub-desc">(optional) Overrides scope passed to constructor</div></li><li><code>newArgs</code> : Array<div class="sub-desc">(optional) Overrides args passed to constructor</div></li> </ul>
|
|
<strong>Returns:</strong>
|
|
<ul>
|
|
<li><code>void</code></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="mdetail-def">This method is defined by DelayedTask.</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
<div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright © 2006-2007 Ext JS, LLC<br />All rights reserved.</div>
|
|
|
|
</body>
|
|
</html> |