Yup.. this totally makes sense.
But I guess you would have to have some sort of array keeping track of the files already loaded, as I think was mentioned inn a post some weeks ago.
But at any rate .. this sounds very sound :)
I mean .. it would definetly simplify for the web guru trying to implement that particular widget or whatever.
I can't even remember how many times I've searched in vain for an error which turned out to be a missing file....
even before using DynAPI2 ...heh
/ Bart
-----Ursprungligt meddelande-----
Från: Bill Wheaton <bil...@us...>
Till: Dyn...@li... <Dyn...@li...>
Datum: den 6 december 2000 22:08
Ämne: [Dynapi-Dev] DynAPI "require" method?
>You know how Perl has "require"?
>Wouldn't it be useful to have DynAPI have a require method.
>That way, at the top of a widget that has to have a Button, LoadPanel and
>ScrollPanel, I could say:
> DynAPI.require('Button', 'LoadPanel', 'ScrollPanel')
>and it would make sure that I got the modules, even if I didn't proclaim it in
>the HTML file with:
> <script language=javascript>
> DynAPI.setLibraryPath('../js/lib')
> DynAPI.include('Button.js')
> DynAPI.include('LoadPanel.js')
> DynAPI.include('ScrollPanel.js')
> DynAPI.include('MenuBoxWidget.js')
> </script>
>Instead I could use:
> <script language=javascript>
> DynAPI.setLibraryPath('../js/lib')
> DynAPI.include('MenuBoxWidget.js')
> </script>
>which would automatically include the right things.
>Maybe this is what that loadLibrary thing is?
>I wouldn't even know how to go about it at this point.
>-bw
>
>____________________________________________________________________
>Get free email and a permanent address at http://www.netaddress.com/?N=1
>_______________________________________________
>Dynapi-Dev mailing list
>Dyn...@li...
>http://lists.sourceforge.net/mailman/listinfo/dynapi-dev
|