Changeset 410 for GearsORM/trunk

Show
Ignore:
Timestamp:
03/21/08 21:01:22 (7 months ago)
Author:
uriel
Message:

*added documentaion for GearsORM.Events.js
*added file header for GearsORM.Sql.js

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • GearsORM/trunk/GearsORM.Events.js

    r340 r410  
     1/* 
     2        Script: GearsORM.Events.js 
     3                Event support for GearsORM  
     4         
     5        License: 
     6                MIT-style license. 
     7*/ 
     8 
     9/* 
     10 Class: GearsORM.Events 
     11        add event support to a class 
     12         
     13 Constructor: 
     14  
     15 */ 
    116GearsORM.Events = function() 
    217{ 
     
    520GearsORM.Events.prototype =  
    621{ 
     22        /* 
     23         Function: addListener 
     24          add a listner on a specific event 
     25           
     26         Parameters: 
     27                name - name of the event 
     28                fn - function to call when the event is fired 
     29         */ 
    730        addListener:function(name,fn) 
    831        { 
     
    1134                return this;     
    1235        }, 
     36        /* 
     37         Function: removeListener 
     38          remove the listner on a specific event 
     39           
     40         Parameters: 
     41                name - name of the event 
     42                fn - function to call when the event is fired 
     43         */ 
    1344        removeListener:function(name,fn) 
    1445        { 
     
    1748                return this; 
    1849        }, 
     50        /* 
     51         Function: fireEvent 
     52          fires the event 
     53           
     54         Parameters: 
     55                name - name of the event 
     56                args - arguments to send to the listeners 
     57                bind - a object to bind listeners to 
     58         */ 
    1959        fireEvent:function(name,args,bind) 
    2060        { 
     
    2666        } 
    2767} 
     68/* 
     69 Function: wrapFunction 
     70  wrap a function with a onBefore and onAfter events 
     71   
     72 Parameters: 
     73        fn - function to wrap 
     74        name - name of the function to wrap 
     75        object - the object who fire the events 
     76 */ 
    2877GearsORM.Events.wrapFunction=function(fn,name,object) 
    2978{ 
  • GearsORM/trunk/GearsORM.Sql.js

    r407 r410  
     1/* 
     2        Script: GearsORM.Sql.js 
     3                Contains functions to generate sql 
     4         
     5        License: 
     6                MIT-style license. 
     7*/ 
     8 
    19GearsORM.Sql = 
    210{