2 |
aperonnet |
1 |
<div class="body-wrap">
|
|
|
2 |
<div class="top-tools">
|
|
|
3 |
<a class="inner-link" href="#Function-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a>
|
|
|
4 |
<a class="inner-link" href="#Function-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a>
|
|
|
5 |
<a class="inner-link" href="#Function-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a>
|
|
|
6 |
<a class="bookmark" href="../docs/?class=Function"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a>
|
|
|
7 |
</div>
|
|
|
8 |
<h1>Class Function</h1>
|
|
|
9 |
<table cellspacing="0">
|
|
|
10 |
<tr><td class="label">Package:</td><td class="hd-info">Global</td></tr>
|
|
|
11 |
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/core/Ext.js" target="_blank">Ext.js</a></td></tr>
|
|
|
12 |
<tr><td class="label">Class:</td><td class="hd-info">Function</td></tr>
|
|
|
13 |
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr>
|
|
|
14 |
</table>
|
|
|
15 |
<div class="description">
|
|
|
16 |
These functions are available on every Function object (any JavaScript function). </div>
|
|
|
17 |
|
|
|
18 |
<div class="hr"></div>
|
|
|
19 |
<a id="Function-props"></a>
|
|
|
20 |
<h2>Public Properties</h2>
|
|
|
21 |
<div class="no-members">This class has no public properties.</div> <a id="Function-methods"></a>
|
|
|
22 |
<h2>Public Methods</h2>
|
|
|
23 |
<table cellspacing="0" class="member-table">
|
|
|
24 |
<tr>
|
|
|
25 |
<th class="sig-header" colspan="2">Method</th>
|
|
|
26 |
<th class="msource-header">Defined By</th>
|
|
|
27 |
</tr>
|
|
|
28 |
<tr class="method-row expandable">
|
|
|
29 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
30 |
<td class="sig">
|
|
|
31 |
<a id="Function-createCallback"></a>
|
|
|
32 |
<b>createCallback</b>() : Function <div class="mdesc">
|
|
|
33 |
<div class="short">Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
|
|
|
34 |
Call directly on any function. Example: ...</div>
|
|
|
35 |
<div class="long">
|
|
|
36 |
Creates a callback that passes arguments[0], arguments[1], arguments[2], ...
|
|
|
37 |
Call directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code>
|
|
|
38 |
Will create a function that is bound to those 2 args. <div class="mdetail-params">
|
|
|
39 |
<strong>Parameters:</strong>
|
|
|
40 |
<ul><li>None.</li> </ul>
|
|
|
41 |
<strong>Returns:</strong>
|
|
|
42 |
<ul>
|
|
|
43 |
<li><code>Function</code><div class="sub-desc">The new function</div></li>
|
|
|
44 |
</ul>
|
|
|
45 |
</div>
|
|
|
46 |
</div>
|
|
|
47 |
</div>
|
|
|
48 |
</td>
|
|
|
49 |
<td class="msource">Function</td>
|
|
|
50 |
</tr>
|
|
|
51 |
<tr class="method-row alt expandable">
|
|
|
52 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
53 |
<td class="sig">
|
|
|
54 |
<a id="Function-createDelegate"></a>
|
|
|
55 |
<b>createDelegate</b>( <span class="optional" title="Optional">[<code>Object obj</code>]</span>, <span class="optional" title="Optional">[<code>Array args</code>]</span>, <span class="optional" title="Optional">[<code>Boolean/Number appendArgs</code>]</span> ) : Function <div class="mdesc">
|
|
|
56 |
<div class="short">Creates a delegate (callback) that sets the scope to obj.
|
|
|
57 |
Call directly on any function. Example: this.myFunction.cre...</div>
|
|
|
58 |
<div class="long">
|
|
|
59 |
Creates a delegate (callback) that sets the scope to obj.
|
|
|
60 |
Call directly on any function. Example: <code>this.myFunction.createDelegate(this)</code>
|
|
|
61 |
Will create a function that is automatically scoped to this. <div class="mdetail-params">
|
|
|
62 |
<strong>Parameters:</strong>
|
|
|
63 |
<ul><li><code>obj</code> : Object<div class="sub-desc">(optional) The object for which the scope is set</div></li><li><code>args</code> : Array<div class="sub-desc">(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</div></li><li><code>appendArgs</code> : Boolean/Number<div class="sub-desc">(optional) if True args are appended to call args instead of overriding,
|
|
|
64 |
if a number the args are inserted at the specified position</div></li> </ul>
|
|
|
65 |
<strong>Returns:</strong>
|
|
|
66 |
<ul>
|
|
|
67 |
<li><code>Function</code><div class="sub-desc">The new function</div></li>
|
|
|
68 |
</ul>
|
|
|
69 |
</div>
|
|
|
70 |
</div>
|
|
|
71 |
</div>
|
|
|
72 |
</td>
|
|
|
73 |
<td class="msource">Function</td>
|
|
|
74 |
</tr>
|
|
|
75 |
<tr class="method-row expandable">
|
|
|
76 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
77 |
<td class="sig">
|
|
|
78 |
<a id="Function-createInterceptor"></a>
|
|
|
79 |
<b>createInterceptor</b>( <code>Function fcn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Function <div class="mdesc">
|
|
|
80 |
<div class="short">Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original ...</div>
|
|
|
81 |
<div class="long">
|
|
|
82 |
Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called.
|
|
|
83 |
The resulting function returns the results of the original function.
|
|
|
84 |
The passed fcn is called with the parameters of the original function.
|
|
|
85 |
@addon <div class="mdetail-params">
|
|
|
86 |
<strong>Parameters:</strong>
|
|
|
87 |
<ul><li><code>fcn</code> : Function<div class="sub-desc">The function to call before the original</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the passed fcn (Defaults to scope of original function or window)</div></li> </ul>
|
|
|
88 |
<strong>Returns:</strong>
|
|
|
89 |
<ul>
|
|
|
90 |
<li><code>Function</code><div class="sub-desc">The new function</div></li>
|
|
|
91 |
</ul>
|
|
|
92 |
</div>
|
|
|
93 |
</div>
|
|
|
94 |
</div>
|
|
|
95 |
</td>
|
|
|
96 |
<td class="msource">Function</td>
|
|
|
97 |
</tr>
|
|
|
98 |
<tr class="method-row alt expandable">
|
|
|
99 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
100 |
<td class="sig">
|
|
|
101 |
<a id="Function-createSequence"></a>
|
|
|
102 |
<b>createSequence</b>( <code>Function fcn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Function <div class="mdesc">
|
|
|
103 |
<div class="short">Create a combined function call sequence of the original function + the passed function.
|
|
|
104 |
The resulting function retur...</div>
|
|
|
105 |
<div class="long">
|
|
|
106 |
Create a combined function call sequence of the original function + the passed function.
|
|
|
107 |
The resulting function returns the results of the original function.
|
|
|
108 |
The passed fcn is called with the parameters of the original function <div class="mdetail-params">
|
|
|
109 |
<strong>Parameters:</strong>
|
|
|
110 |
<ul><li><code>fcn</code> : Function<div class="sub-desc">The function to sequence</div></li><li><code>scope</code> : Object<div class="sub-desc">(optional) The scope of the passed fcn (Defaults to scope of original function or window)</div></li> </ul>
|
|
|
111 |
<strong>Returns:</strong>
|
|
|
112 |
<ul>
|
|
|
113 |
<li><code>Function</code><div class="sub-desc">The new function</div></li>
|
|
|
114 |
</ul>
|
|
|
115 |
</div>
|
|
|
116 |
</div>
|
|
|
117 |
</div>
|
|
|
118 |
</td>
|
|
|
119 |
<td class="msource">Function</td>
|
|
|
120 |
</tr>
|
|
|
121 |
<tr class="method-row expandable">
|
|
|
122 |
<td class="micon"><a class="exi" href="#expand"> </a></td>
|
|
|
123 |
<td class="sig">
|
|
|
124 |
<a id="Function-defer"></a>
|
|
|
125 |
<b>defer</b>( <code>Number millis</code>, <span class="optional" title="Optional">[<code>Object obj</code>]</span>, <span class="optional" title="Optional">[<code>Array args</code>]</span>, <span class="optional" title="Optional">[<code>Boolean/Number appendArgs</code>]</span> ) : Number <div class="mdesc">
|
|
|
126 |
<div class="short">Calls this function after the number of millseconds specified.</div>
|
|
|
127 |
<div class="long">
|
|
|
128 |
Calls this function after the number of millseconds specified. <div class="mdetail-params">
|
|
|
129 |
<strong>Parameters:</strong>
|
|
|
130 |
<ul><li><code>millis</code> : Number<div class="sub-desc">The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)</div></li><li><code>obj</code> : Object<div class="sub-desc">(optional) The object for which the scope is set</div></li><li><code>args</code> : Array<div class="sub-desc">(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</div></li><li><code>appendArgs</code> : Boolean/Number<div class="sub-desc">(optional) if True args are appended to call args instead of overriding,
|
|
|
131 |
if a number the args are inserted at the specified position</div></li> </ul>
|
|
|
132 |
<strong>Returns:</strong>
|
|
|
133 |
<ul>
|
|
|
134 |
<li><code>Number</code><div class="sub-desc">The timeout id that can be used with clearTimeout</div></li>
|
|
|
135 |
</ul>
|
|
|
136 |
</div>
|
|
|
137 |
</div>
|
|
|
138 |
</div>
|
|
|
139 |
</td>
|
|
|
140 |
<td class="msource">Function</td>
|
|
|
141 |
</tr>
|
|
|
142 |
</table>
|
|
|
143 |
<a id="Function-events"></a>
|
|
|
144 |
<h2>Public Events</h2>
|
|
|
145 |
<div class="no-members">This class has no public events.</div>
|
|
|
146 |
</div>
|