From: Scott A. L. <sc...@sc...> - 2000-10-30 23:14:40
|
We could just do this: src = src.split(".").join("/") That would transform "core.gui.widget" into "core/gui/widget" We would have to be careful with files ending in ".js" so they aren't interpreted as "core/gui/widget/js" RE duplicate includes: I have some sample scripts that include the utility files they need to function. For example, a certain widget script would include the colorops.js, slide.js, etc. from inside itself, without me having to declare it in the main document. However, if a script has already been included then we could save a little time/resources by skipping those files if requested again. Robert Rainwater wrote: > > > Am I the only one who hates having to name my scripts after the path to > > them? :-) > > > > core.gui.window.js > > core.ibs.scroll.js > > core.sa.this.js > > core.api.that.js > > I've never figured out why the dynapi files were named that way. In java > core.gui.window.js would mean core/gui/window.js. That seems more > logical to me as well. And since we are using a directory scheme, > there shouldn't be a problem with files having the same name. > > > Also: there was a proposed patch a SourceForge that would have prevented > > scripts from being loaded twice, but never implemented. Was there > > something wrong with this approach? > > The fix can easily be dropped in the include method. But, I'm still not > sure why its needed. Its only a couple of lines so I guess it > wouldn't hurt... > > Robert > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |