Ext.util.DelayedTask.html
5.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<div class="body-wrap">
<div class="top-tools">
<a class="inner-link" href="#Ext.util.DelayedTask-props"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-prop">Properties</a>
<a class="inner-link" href="#Ext.util.DelayedTask-methods"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-method">Methods</a>
<a class="inner-link" href="#Ext.util.DelayedTask-events"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-event">Events</a>
<a class="bookmark" href="../docs/?class=Ext.util.DelayedTask"><img src="../resources/images/default/s_wev8.gif" class="item-icon icon-fav">Direct Link</a>
</div>
<h1>Class Ext.util.DelayedTask</h1>
<table cellspacing="0">
<tr><td class="label">Package:</td><td class="hd-info">Ext.util</td></tr>
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/util/DelayedTask_wev8.js" target="_blank">DelayedTask_wev8.js</a></td></tr>
<tr><td class="label">Class:</td><td class="hd-info">DelayedTask</td></tr>
<tr><td class="label">Extends:</td><td class="hd-info">Object</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>
<div class="hr"></div>
<a id="Ext.util.DelayedTask-props"></a>
<h2>Public Properties</h2>
<div class="no-members">This class has no public properties.</div> <a id="Ext.util.DelayedTask-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 class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.util.DelayedTask-DelayedTask"></a>
<b>DelayedTask</b>( <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> ) <div class="mdesc">
<div class="short">The parameters to this constructor serve as defaults and are not required.</div>
<div class="long">
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>
<strong>Returns:</strong>
<ul>
<li><code></code></li>
</ul>
</div>
</div>
</div>
</td>
<td class="msource">DelayedTask</td>
</tr>
<tr class="method-row alt expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.util.DelayedTask-cancel"></a>
<b>cancel</b>() : void <div class="mdesc">
<div class="short">Cancel the last queued timeout</div>
<div class="long">
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>
</td>
<td class="msource">DelayedTask</td>
</tr>
<tr class="method-row expandable">
<td class="micon"><a class="exi" href="#expand"> </a></td>
<td class="sig">
<a id="Ext.util.DelayedTask-delay"></a>
<b>delay</b>( <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 <div class="mdesc">
<div class="short">Cancels any pending timeout and queues a new one</div>
<div class="long">
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>
</td>
<td class="msource">DelayedTask</td>
</tr>
</table>
<a id="Ext.util.DelayedTask-events"></a>
<h2>Public Events</h2>
<div class="no-members">This class has no public events.</div>
</div>