Changeset 31
- Timestamp:
- 01/03/06 23:03:31 (3 years ago)
- Files:
-
- trunk/jsolait/jsolait.js (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/jsolait/jsolait.js
r28 r31 36 36 If the created class is a public member of a module then 37 37 the __name__ property of that class is automatically set by Module(). 38 @param base s * The base classes.38 @param base1 * The base classes (not an array but one argument per base class). 39 39 @param classScope(-1) A function which is executed for class construction. 40 40 As 1st parameter it will get the new class' protptype for … … 42 42 the super class' wrapper for calling inherited methods. 43 43 **/ 44 Class=function(name, base s, classScope){44 Class=function(name, base1, classScope){ 45 45 var args=[]; 46 46 for(var i=0;i<arguments.length;i++){ … … 146 146 }; 147 147 148 var privId='__priv__' + arguments.callee.__id__;149 rslt[privId]={};150 151 148 var proto=arguments.callee.prototype; 152 149 for(var n in proto){ … … 168 165 rslt=[]; 169 166 170 var privId='__priv__' + arguments.callee.__id__;171 rslt[privId]={};172 173 167 var proto=arguments.callee.prototype; 174 168 for(var n in proto){ … … 179 173 if(rslt.__init__){ 180 174 rslt.__init__.apply(rslt, arguments); 181 }else{//implement Array's defaul behavior182 if(arguments.lengt ==1){175 }else{//implement Array's default behavior 176 if(arguments.length==1){ 183 177 rslt.length=arguments[0]; 184 178 }else{ … … 196 190 var NewClass = function(calledBy){ 197 191 if(calledBy !== Class){ 198 var privId='__priv__' + arguments.callee.__id__;199 this[privId] = {};200 192 if(this.__init__){ 201 193 this.__init__.apply(this, arguments); … … 448 440 /*@moduleURIs end*/ 449 441 450 ///The base URIs to search for modules in. They may contain StringFormating symbols e.g '%(baseURI)s/lib' 451 mod.moduleSearchURIs = [".", "%(baseURI)s/lib"]; 442 /** 443 The base URIs to search for modules in. 444 each item will be formated using moduleSearchURIs[i].format(jsolait) so, 445 they may contain StringFormating symbols e.g '%(baseURI)s/lib' 446 **/ 447 mod.moduleSearchURIs = ["."]; 452 448 453 449 ///The location where jsolait is installed. … … 576 572 var srcURI = src.__sourceURI__; 577 573 src = 'Module.currentURI="%s";\n%s\nModule.currentURI=null;\n'.format(src.__sourceURI__.replace(/\\/g, '\\\\'), src); 578 var f=new Function("",src); //todo should it use globalEval ?574 var f=new Function("",src); 579 575 f(); 580 576 }catch(e){
