Subj : load() search paths...
To : Angus McLeod
From : Digital Man
Date : Thu Aug 13 2009 02:51 pm
Re: load() search paths...
By: Angus McLeod to Deuce on Wed Aug 12 2009 11:24 pm
> Re: load() search paths...
> By: Deuce to Digital Man on Fri Aug 07 2009 10:34:00
>
> > I'm also very fond of the idea of adding a directory under the exec/mods
> > dir group related files together... while I expect 3rd party scripts to
> > be added the mods directory rather than exec, a bit of grouping may
> > help. The questi of course is how to group everything.
>
> Used to be that 3rd party add-ons (doors, etc) were put in their own
> directories under the /SBBS/XTRN directory. With JS now offering another
> option for development of 3rd party add-ons, is it apropriate to install
> such add-ons under /SBBS/XTRN still?
It is appropriate for stand-alone JS add-ons, particulary door-type programs
(e.g. games).
> And if so, should any change to the
> JS load() method cater to add-ons in that location?
Yes, I think Deuce's propsal would do that.
The load() method can already load/execute full (absolute) paths, but that
requires knows the fullpath to the directory where the file was installed.
Relative paths are assumed to be relative to the "mods" or "exec" directory
(the current working directory is not relavent). The tricky part is specifying
the correct path for every load() statement and being able to dynamically add
paths to the load() search is a good idea, I think.
digital man
Snapple "Real Fact" #152:
In 1985, the fastest bicyclist was clocked at 154 mph.
---
� Synchronet � Vertrauen � Home of Synchronet � telnet://vert.synchro.net