New file |
0,0 → 1,146 |
<div class="body-wrap"> |
<div class="top-tools"> |
<a class="inner-link" href="#Function-props"><img src="../resources/images/default/s.gif" class="item-icon icon-prop">Properties</a> |
<a class="inner-link" href="#Function-methods"><img src="../resources/images/default/s.gif" class="item-icon icon-method">Methods</a> |
<a class="inner-link" href="#Function-events"><img src="../resources/images/default/s.gif" class="item-icon icon-event">Events</a> |
<a class="bookmark" href="../docs/?class=Function"><img src="../resources/images/default/s.gif" class="item-icon icon-fav">Direct Link</a> |
</div> |
<h1>Class Function</h1> |
<table cellspacing="0"> |
<tr><td class="label">Package:</td><td class="hd-info">Global</td></tr> |
<tr><td class="label">Defined In:</td><td class="hd-info"><a href="../source/core/Ext.js" target="_blank">Ext.js</a></td></tr> |
<tr><td class="label">Class:</td><td class="hd-info">Function</td></tr> |
<tr><td class="label">Extends:</td><td class="hd-info">Object</td></tr> |
</table> |
<div class="description"> |
These functions are available on every Function object (any JavaScript function). </div> |
|
<div class="hr"></div> |
<a id="Function-props"></a> |
<h2>Public Properties</h2> |
<div class="no-members">This class has no public properties.</div> <a id="Function-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="Function-createCallback"></a> |
<b>createCallback</b>() : Function <div class="mdesc"> |
<div class="short">Creates a callback that passes arguments[0], arguments[1], arguments[2], ... |
Call directly on any function. Example: ...</div> |
<div class="long"> |
Creates a callback that passes arguments[0], arguments[1], arguments[2], ... |
Call directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code> |
Will create a function that is bound to those 2 args. <div class="mdetail-params"> |
<strong>Parameters:</strong> |
<ul><li>None.</li> </ul> |
<strong>Returns:</strong> |
<ul> |
<li><code>Function</code><div class="sub-desc">The new function</div></li> |
</ul> |
</div> |
</div> |
</div> |
</td> |
<td class="msource">Function</td> |
</tr> |
<tr class="method-row alt expandable"> |
<td class="micon"><a class="exi" href="#expand"> </a></td> |
<td class="sig"> |
<a id="Function-createDelegate"></a> |
<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"> |
<div class="short">Creates a delegate (callback) that sets the scope to obj. |
Call directly on any function. Example: this.myFunction.cre...</div> |
<div class="long"> |
Creates a delegate (callback) that sets the scope to obj. |
Call directly on any function. Example: <code>this.myFunction.createDelegate(this)</code> |
Will create a function that is automatically scoped to this. <div class="mdetail-params"> |
<strong>Parameters:</strong> |
<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, |
if a number the args are inserted at the specified position</div></li> </ul> |
<strong>Returns:</strong> |
<ul> |
<li><code>Function</code><div class="sub-desc">The new function</div></li> |
</ul> |
</div> |
</div> |
</div> |
</td> |
<td class="msource">Function</td> |
</tr> |
<tr class="method-row expandable"> |
<td class="micon"><a class="exi" href="#expand"> </a></td> |
<td class="sig"> |
<a id="Function-createInterceptor"></a> |
<b>createInterceptor</b>( <code>Function fcn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Function <div class="mdesc"> |
<div class="short">Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original ...</div> |
<div class="long"> |
Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called. |
The resulting function returns the results of the original function. |
The passed fcn is called with the parameters of the original function. |
@addon <div class="mdetail-params"> |
<strong>Parameters:</strong> |
<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> |
<strong>Returns:</strong> |
<ul> |
<li><code>Function</code><div class="sub-desc">The new function</div></li> |
</ul> |
</div> |
</div> |
</div> |
</td> |
<td class="msource">Function</td> |
</tr> |
<tr class="method-row alt expandable"> |
<td class="micon"><a class="exi" href="#expand"> </a></td> |
<td class="sig"> |
<a id="Function-createSequence"></a> |
<b>createSequence</b>( <code>Function fcn</code>, <span class="optional" title="Optional">[<code>Object scope</code>]</span> ) : Function <div class="mdesc"> |
<div class="short">Create a combined function call sequence of the original function + the passed function. |
The resulting function retur...</div> |
<div class="long"> |
Create a combined function call sequence of the original function + the passed function. |
The resulting function returns the results of the original function. |
The passed fcn is called with the parameters of the original function <div class="mdetail-params"> |
<strong>Parameters:</strong> |
<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> |
<strong>Returns:</strong> |
<ul> |
<li><code>Function</code><div class="sub-desc">The new function</div></li> |
</ul> |
</div> |
</div> |
</div> |
</td> |
<td class="msource">Function</td> |
</tr> |
<tr class="method-row expandable"> |
<td class="micon"><a class="exi" href="#expand"> </a></td> |
<td class="sig"> |
<a id="Function-defer"></a> |
<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"> |
<div class="short">Calls this function after the number of millseconds specified.</div> |
<div class="long"> |
Calls this function after the number of millseconds specified. <div class="mdetail-params"> |
<strong>Parameters:</strong> |
<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, |
if a number the args are inserted at the specified position</div></li> </ul> |
<strong>Returns:</strong> |
<ul> |
<li><code>Number</code><div class="sub-desc">The timeout id that can be used with clearTimeout</div></li> |
</ul> |
</div> |
</div> |
</div> |
</td> |
<td class="msource">Function</td> |
</tr> |
</table> |
<a id="Function-events"></a> |
<h2>Public Events</h2> |
<div class="no-members">This class has no public events.</div> |
</div> |