1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8 <meta name="generator" content="JsDoc Toolkit" />
11 <title>JsDoc Reference - Function</title>
14 <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />
15 <link rel="stylesheet" type="text/css" href="../default.css" />
18 <script type="text/javascript" src="../page.js">
25 <body onload="RooDocsPage.onload();">
28 <div class="body-wrap">
30 <!-- ============================== links to methods. ================================= -->
32 <div class="top-tools">
34 <a class="inner-link" href="#Function-props"><img src="resources/s.gif" class="item-icon icon-prop">Properties</a>
35 <a class="inner-link" href="#Function-methods"><img src="resources/s.gif" class="item-icon icon-method">Methods</a>
36 <a class="inner-link" href="#Function-events"><img src="resources/s.gif" class="item-icon icon-event">Events</a>
37 <a class="inner-link" href="#Function-configs"><img src="resources/s.gif" class="item-icon icon-config">Config Options</a>
38 <a class="bookmark" href="NEED_TO_CREATE_DIRECT_LINK_HREF"><img src="resources/s.gif" class="item-icon icon-fav">Direct Link</a>
43 <!-- ============================== inheritance Block. ================================= -->
45 <!-- ============================== class title / details ============================ -->
48 <h1 class="classTitle">
50 Built-In Class Function
53 <table cellspacing="0" class="class-summary-table">
55 <tr><td class="label">Defined In:</td><td class="hd-info">
57 <a href="./src/Function.js.html">Function.js</a>.
60 <tr><td class="label">Class:</td><td class="hd-info">Function</td></tr>
68 <!-- ============================== class summary ========================== -->
69 <div class="description">
70 These functions are available on every Function object (any JavaScript function).
74 <!-- ============================== Class comment block... ========================== -->
76 <div class="comments">
77 <b>Class Comments / Notes</B> =>
78 <u onclick="parent.CommentDialog.showCommentId = 'Function';">[Add Your comment/notes about this class]</u>
80 <iframe frameborder="0" id="comments-" style="border: none;width:100%;"
81 src="/blog.php/GtkDjsComments/Function.html"></iframe>
86 <!-- ============================== config options ========================== -->
91 <div class="hr"></div>
92 <a id="Function-configs"></a>
96 <table cellspacing="0" class="member-table">
97 <caption class="Empty">Config Options - Has None</caption>
111 <!-- ============================== public properties ==================== -->
115 <a id="Function-props"></a>
121 <table cellspacing="0" class="member-table">
122 <caption class="Empty">Public Properties - Has None</caption>
128 <!-- ============================== methods summary / details ======================== -->
131 <a id="Function-methods"></a>
132 <!-- constructor?? -->
139 <!-- then dynamics first -->
146 <table cellspacing="0" class="member-table">
147 <caption>Public Methods</caption>
149 <th class="sig-header" colspan="2">Method</th>
150 <th class="msource-header">Defined By</th>
160 <tr class="method-row config-row-alt0 expandable notInherited">
161 <td class="micon"><a class="exi" href="#expand"> </a></td>
165 <a id="Function-method-createCallback" name=".createCallback"></a>
166 <div class="fixedFont">
167 <span class="attributes"></span><b class="itemname">createCallback</b>
175 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
184 <div class="short">Creates a callback that passes arguments[0], arguments[1], arguments[2], .</div>
190 Creates a callback that passes arguments[0], arguments[1], arguments[2], ...<br/>Call directly on any function. Example: <code>myFunction.createCallback(myarg, myarg2)</code><br/>Will create a function that is bound to those 2 args.
201 <dl class="detailList">
202 <dt class="heading">Returns:</dt>
204 <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> The new function</dd>
226 <tr class="method-row config-row-alt1 expandable notInherited">
227 <td class="micon"><a class="exi" href="#expand"> </a></td>
231 <a id="Function-method-createDelegate" name=".createDelegate"></a>
232 <div class="fixedFont">
233 <span class="attributes"></span><b class="itemname">createDelegate</b>
235 (<a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>obj</i></B>, <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a> <B><i>args</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>/Number <B><i>appendArgs</i></B>)
241 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
250 <div class="short">Creates a delegate (callback) that sets the scope to obj.</div>
256 Creates a delegate (callback) that sets the scope to obj.<br/>Call directly on any function. Example: <code>this.myFunction.createDelegate(this)</code><br/>Will create a function that is automatically scoped to this.
263 <dl class="detailList">
264 <dt class="heading">Parameters:</dt>
267 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>obj</b>
270 <dd>(optional) The object for which the scope is set</dd>
273 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> <b>args</b>
276 <dd>(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</dd>
279 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>/Number</span> <b>appendArgs</b>
282 <dd>(optional) if True args are appended to call args instead of overriding,<br/> if a number the args are inserted at the specified position</dd>
290 <dl class="detailList">
291 <dt class="heading">Returns:</dt>
293 <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> The new function</dd>
315 <tr class="method-row config-row-alt0 expandable notInherited">
316 <td class="micon"><a class="exi" href="#expand"> </a></td>
320 <a id="Function-method-createInterceptor" name=".createInterceptor"></a>
321 <div class="fixedFont">
322 <span class="attributes"></span><b class="itemname">createInterceptor</b>
324 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fcn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
330 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
339 <div class="short">Creates an interceptor function.</div>
345 Creates an interceptor function. The passed fcn is called before the original one. If it returns false, the original one is not called.<br/>The resulting function returns the results of the original function.<br/>The passed fcn is called with the parameters of the original function.
352 <dl class="detailList">
353 <dt class="heading">Parameters:</dt>
356 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fcn</b>
359 <dd>The function to call before the original</dd>
362 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
365 <dd>(optional) The scope of the passed fcn (Defaults to scope of original function or window)</dd>
373 <dl class="detailList">
374 <dt class="heading">Returns:</dt>
376 <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> The new function</dd>
398 <tr class="method-row config-row-alt1 expandable notInherited">
399 <td class="micon"><a class="exi" href="#expand"> </a></td>
403 <a id="Function-method-createSequence" name=".createSequence"></a>
404 <div class="fixedFont">
405 <span class="attributes"></span><b class="itemname">createSequence</b>
407 (<a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a> <B><i>fcn</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>scope</i></B>)
413 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
422 <div class="short">Create a combined function call sequence of the original function + the passed function.</div>
428 Create a combined function call sequence of the original function + the passed function.<br/>The resulting function returns the results of the original function.<br/>The passed fcn is called with the parameters of the original function
435 <dl class="detailList">
436 <dt class="heading">Parameters:</dt>
439 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> <b>fcn</b>
442 <dd>The function to sequence</dd>
445 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>scope</b>
448 <dd>(optional) The scope of the passed fcn (Defaults to scope of original function or window)</dd>
456 <dl class="detailList">
457 <dt class="heading">Returns:</dt>
459 <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span> The new function</dd>
481 <tr class="method-row config-row-alt0 expandable notInherited">
482 <td class="micon"><a class="exi" href="#expand"> </a></td>
486 <a id="Function-method-defer" name=".defer"></a>
487 <div class="fixedFont">
488 <span class="attributes"></span><b class="itemname">defer</b>
490 (<a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a> <B><i>millis</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a> <B><i>obj</i></B>, <a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a> <B><i>args</i></B>, <a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>/Number <B><i>appendArgs</i></B>)
496 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
505 <div class="short">Calls this function after the number of millseconds specified.</div>
511 Calls this function after the number of millseconds specified.
518 <dl class="detailList">
519 <dt class="heading">Parameters:</dt>
522 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> <b>millis</b>
525 <dd>The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)</dd>
528 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Object">Object</a></span> <b>obj</b>
531 <dd>(optional) The object for which the scope is set</dd>
534 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span> <b>args</b>
537 <dd>(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</dd>
540 <span class="fixedFont"><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Global_Objects:Boolean">Boolean</a>/Number</span> <b>appendArgs</b>
543 <dd>(optional) if True args are appended to call args instead of overriding,<br/> if a number the args are inserted at the specified position</dd>
551 <dl class="detailList">
552 <dt class="heading">Returns:</dt>
554 <dd><span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span> The timeout id that can be used with clearTimeout</dd>
579 <!-- ============================== events summary / details ======================== -->
582 <a id="Function-events"></a>
588 <table cellspacing="0" class="member-table">
589 <caption class="Empty">Events - Has None</caption>
600 <!-- ============================== footer ================================= -->
601 <div class="fineprint" style="clear:both">
603 Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a> on Fri Jul 13 2018 14:10:53 GMT+0800 (HKT)
605 <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>