From: jonathan e. <eis...@st...> - 2003-11-19 19:52:23
|
At 12:58 PM 11/19/2003 -0500, you wrote: >Alternatly, you can load the Base DynAPI without the libraries, and then >load the additional libraries when you need them >(I assume that you can do that..) Well, this is what I thought I was doing per the code snippet originally sent. However, while looking for the frame example, I did run across the example for the extension to library to dynamically load libraries. This appears to be just changing all the dynapi.library.include into dynapi.library.load statements. See the new code snippet below. This all works fine except for DragEvent. At the 'dynapi.library.load("DragEvent")', Mozilla produces an exception with the text "Object cannot be created in this context". Through some testing, it appears that if 'dynapi.api' is loaded dynamically, the DragEvent initialization fails. Summary: the dynapi.library.load method is what I want, and does work. But DragEvent breaks. Code Snippet: <script language="JavaScript" src="/library/dynapi3x/src/dynapi.js" type="text/JavaScript"></script> <script language="JavaScript"> dynapi.library.setPath('/library/dynapi3x/src/'); dynapi.library.include('dynapi.library'); </script> <script language="JavaScript"> dynapi.onLoad( function() { dynapi.library.load('dynapi.api'); dynapi.library.load('dynapi.gui.LoadPanel'); dynapi.library.load('DragEvent'); dynapiLoaded = true; } ); </script> |