From: Robert R. <rra...@ya...> - 2000-11-05 08:08:24
|
> Is this the preferred method of storing and loading scripts? > How can I store my scripts separately from the CORE scripts, as in > completely different spot, other than the "core" directory. > Can there be more than one "setLibraryPath", for example: > > DynAPI.setLibraryPath('../../core/js/lib2.0/') > DynAPI.setLibraryPath('../../rlb/js/lib2.0/') There is a paramater on the include that allows you to pass an alternate path. So: DynAPI.include('mystuff.gui.button.js','../mywidgets/') The path that you pass is the root path. So inside there you would need mystuff/gui/mystuff.gui.button.js. There's been some talk that the filename shouldnt have the path in it as well. That could be changed in the future. There is also a function addLibrary(name,files). Where name is the name like gui and the files are the last part of the file names, like button.js as an array like addLibrary('mygui',['x.js',y.js']). You can use this to allow you to say DynAPI.include('core.gui.*'). \\Robert -- |