|
From: Brandon M. <bnd...@ho...> - 2000-12-06 21:41:00
|
Ohh.. boy.. here we go again on this subject. This has been a big issue..
and that there are problems when including external javascript after a
certain level deep. What is the max level? I don't know. I just know that
there have been problems doing this. And the widgets would have to not
require anything in those external files untill AFTER the onLoad event. I
know this much from experience.
I do, however, rely on this method to allow external JS files to specify
what files are in each browser specific library.
----- Original Message -----
From: "Bill Wheaton" <bil...@us...>
To: <Dyn...@li...>
Sent: Wednesday, December 06, 2000 3:28 PM
Subject: [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
|