Changeset 40
- Timestamp:
- 06/05/08 16:30:16 (6 months ago)
- Files:
-
- trunk/lily/lily/chrome/content/debug.js (modified) (1 diff)
- trunk/lily/lily/chrome/content/externals.js (modified) (4 diffs)
- trunk/lily/lily/chrome/content/externals/patcher.js (modified) (2 diffs)
- trunk/lily/lily/chrome/content/patch.js (modified) (3 diffs)
- trunk/lily/lily/chrome/content/utils.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lily/lily/chrome/content/debug.js
r14 r40 127 127 error:function(msg) { 128 128 if(this.dWin) { 129 setTimeout(function(){LilyDebugWindow.dispatch(( "⢠"+msg),"bold",null,null,null,"red")},1);129 setTimeout(function(){LilyDebugWindow.dispatch((msg),"bold",null,null,null,"red")},1); 130 130 } 131 131 }, trunk/lily/lily/chrome/content/externals.js
r14 r40 139 139 this.objDisplay[((this.objArray[i].menuName)?this.objArray[i].menuName:"tmp")]=objName; 140 140 this.objDisplay[objName]=objName; 141 this.objLeaf[this.objArray[i].name]=this.objArray[i].name; 141 this.objLeaf[this.objArray[i].name]=this.objArray[i].name; 142 142 } catch(e) { 143 143 LilyDebugWindow.error("External object "+extName.toUpperCase()+" couldn't be loaded: "+e.name + ": " + e.message+" "+e.fileName+", line: "+e.lineNumber) … … 256 256 257 257 source = LilyUtils.readFileFromPath(path,false).data; 258 LilyUtils.loadScript("file://"+path,Lily);258 if(!LilyUtils.isPatchString()) LilyUtils.loadScript("file://"+path,Lily); //only load externs, not patches 259 259 260 260 return source; //return the source … … 293 293 */ 294 294 isLoadable: function(str) { 295 return str.match(/\.js$|\.zip$|\.rsrc$ /);295 return str.match(/\.js$|\.zip$|\.rsrc$|.json$/); 296 296 }, 297 297 … … 317 317 var tmp=[]; 318 318 for(var i=0;i<this.objArray.length;i++) { 319 if(this.objArray[i].name.indexOf(".json")==-1) 320 tmp.push(this.objArray[i]); 319 tmp.push(this.objArray[i]); 321 320 } 322 321 tmp.sort(function(a,b) { trunk/lily/lily/chrome/content/externals/patcher.js
r24 r40 41 41 42 42 //flag to determine if we've got a patch string or file path 43 var isPatchString=(/var patch={/.test(param)||!param.length); 44 43 var isPatchString=(/var patch={/.test(param)||!param.length); 44 45 45 var pArr = (!isPatchString)?LilyUtils.splitArgs(param):[]; 46 46 this.fPath = (!isPatchString)?pArr.shift():""; //pull off the path … … 48 48 this.displayArgs=(isPatchString)?false:true; //don't display argument if it isn't a patch path 49 49 this.patchArgs=(!isPatchString)?pArr.join(" "):""; //rest of args as a string 50 51 if(!isPatchString && /##\w+##/.test(param)) { 52 this.displayName = param.match(/##(\w+)##/)[1]; 53 this.displayArgs = false; 54 } 50 55 51 56 //inlet/outlet arrays trunk/lily/lily/chrome/content/patch.js
r35 r40 376 376 var obj=(this.getModule(name))?this.getModule(name):this.getModule("tmp"); 377 377 var count=this.patchModel.getObjectCount()+1; //get the patch object count 378 379 if(obj ) {378 379 if(obj && typeof obj == "function") { 380 380 //prototype the base to the class we're creating & then create it. 381 381 obj.prototype=new LilyObjectBase(className,this,subPatchID,top,left,objID,argStr); … … 415 415 416 416 o.init(); //generic- user defined 417 } else if(obj && typeof obj == "string") { 418 this.createObject("patcher",pID,t,l,id,(obj+" ##"+className+"##")); 417 419 } 418 420 … … 1048 1050 1049 1051 if(typeof Lily["$"+LilyObjectList.objDisplay[className]] != "undefined") { 1050 return Lily["$"+LilyObjectList.objDisplay[className]]; 1052 return Lily["$"+LilyObjectList.objDisplay[className]]; //external 1053 } else if(LilyObjectList.search(className)) { 1054 return LilyObjectList.search(className).path; //if its a patch, just return the path 1051 1055 } else { 1052 1056 //if the object isn't found- look in the patch directory/subdirectories. 1053 1057 var dir = this.getPatchDir(); 1054 if(!LilyObjectList.isLoaded(className) && dir) { //this loads the objectif found1058 if(!LilyObjectList.isLoaded(className) && dir) { //this loads the extern if found 1055 1059 if(!LilyObjectList.searchDirectory(dir,className+".js")) { 1056 LilyDebugWindow.error("Couldn't find external "+oArray[x].name+"."); 1057 return null; 1060 if(!LilyObjectList.searchDirectory(dir,className+".json")) { //this loads the patch if found 1061 LilyDebugWindow.error("Couldn't find external "+oArray[x].name+"."); 1062 return null; 1063 } else { 1064 return LilyObjectList.search(className).path; //if its a patch, just return the path 1065 } 1058 1066 } else { 1059 1067 return Lily["$"+LilyObjectList.objDisplay[className]]; trunk/lily/lily/chrome/content/utils.js
r32 r40 66 66 */ 67 67 getObjectMetaData: function(objName) { 68 return Lily["$"+objName+"MetaData"]; 68 if(typeof Lily["$"+objName+"MetaData"] != "undefined") { 69 return Lily["$"+objName+"MetaData"]; 70 } else { //if its not defined then return some barebones value 71 return { 72 textName:objName, 73 htmlName:objName, 74 objectCategory:"", 75 objectSummary:"", 76 objectArguments:"" 77 } 78 } 69 79 }, 70 80
