sync
[roojs1] / docs / symbols / Function.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
3
4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
6         <head>
7                 <meta http-equiv="content-type" content="text/html; charset=undefined" />
8                 <meta name="generator" content="JsDoc Toolkit" />
9                 
10                 
11                 <title>JsDoc Reference - Function</title>
12                 
13                 
14         <link rel="stylesheet" type="text/css" href="../../css/roojs.css" />            
15         <link rel="stylesheet" type="text/css" href="../default.css" />
16         
17         
18         <script type="text/javascript" src="../page.js">
19         
20         </script>
21          
22                 
23         </head>
24
25         <body onload="RooDocsPage.onload();">
26          
27         
28 <div class="body-wrap">
29
30     <!-- ============================== links to methods. ================================= --> 
31
32     <div class="top-tools">
33     <!--
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>
39         -->
40     </div>
41
42     
43 <!-- ============================== inheritance Block. ================================= -->    
44         
45 <!-- ============================== class title / details ============================ -->
46     
47     
48     <h1 class="classTitle">
49                                 
50                                 Built-In Class Function
51                         </h1>
52                         
53     <table cellspacing="0" class="class-summary-table">
54         
55         <tr><td class="label">Defined In:</td><td class="hd-info">
56                         
57                                         <a href="./src/Function.js.html">Function.js</a>.
58                         
59         </td></tr>
60         <tr><td class="label">Class:</td><td class="hd-info">Function</td></tr>
61         
62         
63         
64         
65     </table>
66
67     
68 <!-- ============================== class summary ========================== -->                        
69     <div class="description">
70         These functions are available on every Function object (any JavaScript function).
71     </div>
72
73         
74 <!-- ============================== Class comment block... ========================== -->                                       
75
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>
79         <br/>
80         <iframe frameborder="0"  id="comments-" style="border: none;width:100%;" 
81                 src="/blog.php/GtkDjsComments/Function.html"></iframe>
82 </div>
83         
84
85                 
86 <!-- ============================== config options ========================== -->                                               
87                  
88     
89     
90                 
91     <div class="hr"></div>
92     <a id="Function-configs"></a>
93                 
94     
95     
96      <table cellspacing="0" class="member-table">
97       <caption class="Empty">Config Options - Has None</caption>
98      </table>
99     
100     
101      
102                 
103   
104   
105   
106   
107   
108   
109   
110   
111   <!-- ============================== public properties ==================== -->        
112   
113   
114   
115     <a id="Function-props"></a>      
116     
117     
118
119     
120     
121      <table cellspacing="0" class="member-table">
122       <caption class="Empty">Public Properties - Has None</caption>
123      </table>
124     
125     
126      
127     
128   <!-- ============================== methods summary / details ======================== -->
129   
130   
131   <a id="Function-methods"></a>
132         <!-- constructor?? -->
133         
134         <!-- static's first 
135         
136         
137         -->
138         
139         <!-- then dynamics first -->
140         
141   
142   
143     
144     
145     
146       <table cellspacing="0" class="member-table">
147       <caption>Public Methods</caption>
148         <tr>
149             <th class="sig-header" colspan="2">Method</th>            
150             <th class="msource-header">Defined By</th>
151
152         </tr>
153         
154         
155         
156          
157         
158         
159           
160           <tr class="method-row config-row-alt0 expandable notInherited">
161             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
162            
163            
164             <td class="sig">
165                 <a id="Function-method-createCallback"   name=".createCallback"></a>
166                 <div class="fixedFont">
167                         <span class="attributes"></span><b class="itemname">createCallback</b>
168                                 
169                                  () 
170                         
171                                 
172                                          : 
173                                         
174                                                 
175                                                 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
176                                         
177                                         
178                                         
179                                 
180                         
181                 </div>
182                 <div class="mdesc">
183                 
184                    <div class="short">Creates a callback that passes arguments[0], arguments[1], arguments[2], .</div> 
185                  
186                  
187                  
188                     <div class="long">
189                         
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.
191                     
192                                 
193                         
194                         
195                         
196                         
197                         
198                         
199                         
200                         
201                                 <dl class="detailList">
202                                 <dt class="heading">Returns:</dt>
203                                 
204                                         <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  The new function</dd>
205                                 
206                                 </dl>
207                         
208                         
209                         
210
211                     
212                     
213                      
214                     </div>                    
215                 </div>
216
217             </td>
218             <td class="msource">
219                 
220                         Function
221                 &nbsp;
222             </td>
223         </tr>
224         
225           
226           <tr class="method-row config-row-alt1 expandable notInherited">
227             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
228            
229            
230             <td class="sig">
231                 <a id="Function-method-createDelegate"   name=".createDelegate"></a>
232                 <div class="fixedFont">
233                         <span class="attributes"></span><b class="itemname">createDelegate</b>
234                                 
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>) 
236                         
237                                 
238                                          : 
239                                         
240                                                 
241                                                 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
242                                         
243                                         
244                                         
245                                 
246                         
247                 </div>
248                 <div class="mdesc">
249                 
250                    <div class="short">Creates a delegate (callback) that sets the scope to obj.</div> 
251                  
252                  
253                  
254                     <div class="long">
255                         
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.
257                     
258                                 
259                         
260                         
261                         
262                         
263                                 <dl class="detailList">
264                                 <dt class="heading">Parameters:</dt>
265                                 
266                                         <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>
268                                                 
269                                         </dt>
270                                         <dd>(optional) The object for which the scope is set</dd>
271                                 
272                                         <dt>
273                                                 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>  <b>args</b>
274                                                 
275                                         </dt>
276                                         <dd>(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</dd>
277                                 
278                                         <dt>
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>
280                                                 
281                                         </dt>
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>
283                                 
284                                 </dl>
285                         
286                         
287                         
288                         
289                         
290                                 <dl class="detailList">
291                                 <dt class="heading">Returns:</dt>
292                                 
293                                         <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  The new function</dd>
294                                 
295                                 </dl>
296                         
297                         
298                         
299
300                     
301                     
302                      
303                     </div>                    
304                 </div>
305
306             </td>
307             <td class="msource">
308                 
309                         Function
310                 &nbsp;
311             </td>
312         </tr>
313         
314           
315           <tr class="method-row config-row-alt0 expandable notInherited">
316             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
317            
318            
319             <td class="sig">
320                 <a id="Function-method-createInterceptor"   name=".createInterceptor"></a>
321                 <div class="fixedFont">
322                         <span class="attributes"></span><b class="itemname">createInterceptor</b>
323                                 
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>) 
325                         
326                                 
327                                          : 
328                                         
329                                                 
330                                                 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
331                                         
332                                         
333                                         
334                                 
335                         
336                 </div>
337                 <div class="mdesc">
338                 
339                    <div class="short">Creates an interceptor function.</div> 
340                  
341                  
342                  
343                     <div class="long">
344                         
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.
346                     
347                                 
348                         
349                         
350                         
351                         
352                                 <dl class="detailList">
353                                 <dt class="heading">Parameters:</dt>
354                                 
355                                         <dt>
356                                                 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  <b>fcn</b>
357                                                 
358                                         </dt>
359                                         <dd>The function to call before the original</dd>
360                                 
361                                         <dt>
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>
363                                                 
364                                         </dt>
365                                         <dd>(optional) The scope of the passed fcn (Defaults to scope of original function or window)</dd>
366                                 
367                                 </dl>
368                         
369                         
370                         
371                         
372                         
373                                 <dl class="detailList">
374                                 <dt class="heading">Returns:</dt>
375                                 
376                                         <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  The new function</dd>
377                                 
378                                 </dl>
379                         
380                         
381                         
382
383                     
384                     
385                      
386                     </div>                    
387                 </div>
388
389             </td>
390             <td class="msource">
391                 
392                         Function
393                 &nbsp;
394             </td>
395         </tr>
396         
397           
398           <tr class="method-row config-row-alt1 expandable notInherited">
399             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
400            
401            
402             <td class="sig">
403                 <a id="Function-method-createSequence"   name=".createSequence"></a>
404                 <div class="fixedFont">
405                         <span class="attributes"></span><b class="itemname">createSequence</b>
406                                 
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>) 
408                         
409                                 
410                                          : 
411                                         
412                                                 
413                                                 <a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a>
414                                         
415                                         
416                                         
417                                 
418                         
419                 </div>
420                 <div class="mdesc">
421                 
422                    <div class="short">Create a combined function call sequence of the original function + the passed function.</div> 
423                  
424                  
425                  
426                     <div class="long">
427                         
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
429                     
430                                 
431                         
432                         
433                         
434                         
435                                 <dl class="detailList">
436                                 <dt class="heading">Parameters:</dt>
437                                 
438                                         <dt>
439                                                 <span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  <b>fcn</b>
440                                                 
441                                         </dt>
442                                         <dd>The function to sequence</dd>
443                                 
444                                         <dt>
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>
446                                                 
447                                         </dt>
448                                         <dd>(optional) The scope of the passed fcn (Defaults to scope of original function or window)</dd>
449                                 
450                                 </dl>
451                         
452                         
453                         
454                         
455                         
456                                 <dl class="detailList">
457                                 <dt class="heading">Returns:</dt>
458                                 
459                                         <dd><span class="fixedFont"><a href="./Function.html#constructor" roo:cls="Function.html#constructor">Function</a></span>  The new function</dd>
460                                 
461                                 </dl>
462                         
463                         
464                         
465
466                     
467                     
468                      
469                     </div>                    
470                 </div>
471
472             </td>
473             <td class="msource">
474                 
475                         Function
476                 &nbsp;
477             </td>
478         </tr>
479         
480           
481           <tr class="method-row config-row-alt0 expandable notInherited">
482             <td class="micon"><a class="exi" href="#expand">&nbsp;</a></td>
483            
484            
485             <td class="sig">
486                 <a id="Function-method-defer"   name=".defer"></a>
487                 <div class="fixedFont">
488                         <span class="attributes"></span><b class="itemname">defer</b>
489                                 
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>) 
491                         
492                                 
493                                          : 
494                                         
495                                                 
496                                                 <a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a>
497                                         
498                                         
499                                         
500                                 
501                         
502                 </div>
503                 <div class="mdesc">
504                 
505                    <div class="short">Calls this function after the number of millseconds specified.</div> 
506                  
507                  
508                  
509                     <div class="long">
510                         
511                                 Calls this function after the number of millseconds specified.
512                     
513                                 
514                         
515                         
516                         
517                         
518                                 <dl class="detailList">
519                                 <dt class="heading">Parameters:</dt>
520                                 
521                                         <dt>
522                                                 <span class="fixedFont"><a href="./Number.html#constructor" roo:cls="Number.html#constructor">Number</a></span>  <b>millis</b>
523                                                 
524                                         </dt>
525                                         <dd>The number of milliseconds for the setTimeout call (if 0 the function is executed immediately)</dd>
526                                 
527                                         <dt>
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>
529                                                 
530                                         </dt>
531                                         <dd>(optional) The object for which the scope is set</dd>
532                                 
533                                         <dt>
534                                                 <span class="fixedFont"><a href="./Array.html#constructor" roo:cls="Array.html#constructor">Array</a></span>  <b>args</b>
535                                                 
536                                         </dt>
537                                         <dd>(optional) Overrides arguments for the call. (Defaults to the arguments passed by the caller)</dd>
538                                 
539                                         <dt>
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>
541                                                 
542                                         </dt>
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>
544                                 
545                                 </dl>
546                         
547                         
548                         
549                         
550                         
551                                 <dl class="detailList">
552                                 <dt class="heading">Returns:</dt>
553                                 
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>
555                                 
556                                 </dl>
557                         
558                         
559                         
560
561                     
562                     
563                      
564                     </div>                    
565                 </div>
566
567             </td>
568             <td class="msource">
569                 
570                         Function
571                 &nbsp;
572             </td>
573         </tr>
574         
575                                                        
576     </table>
577
578   
579   <!-- ============================== events summary / details ======================== -->
580   
581   
582   <a id="Function-events"></a>
583     
584   
585         
586    
587     
588      <table cellspacing="0" class="member-table">
589       <caption class="Empty">Events - Has None</caption>
590      </table>
591     
592     
593   
594     
595     
596   
597   
598   
599  
600 <!-- ============================== footer ================================= -->
601                 <div class="fineprint" style="clear:both">
602                         
603                         Documentation generated by <a href="http://www.akbkhome.com" target="_blankt">Introspection Doc Generator</a>  on Tue Jul 27 2010 11:05:06 GMT+0800 (HKT)
604                         Based on 
605                         <a href="http://www.jsdoctoolkit.org/" target="_blank">JsDoc Toolkit</a>  
606                 </div>
607         </body>
608 </html>