The code is downloaded before it is executed, as such, the downloading of required code is not done until after the current code is finished.

sinse java does all the syncronization, there are no problems.

I have even been able to put includes in some of my methods as such:

DynGUI.Layer.prototype.setURL=function(url,js,noevt) {
    if (!FileIO.parseHTML) DynAPI.include('afroapi.file.io');
    var content=FileIO.readURL(url,js);
    this.setHTML(content.body||content,noevt);
};

this means that if the user never uses this method, there is no need in downloading the code.

Robert Rainwater wrote:

I'm not sure how you are planning on doing up, but if you try doing
dynamic includes by nesting includes, it tends to crash the browser.
I'm not sure the bloat that will be required is worth it. Something
that might better is to have a registerpackage and requirepackage in
the script files. Then just use an alert if the required package(s)
isnt registered. Trying to fix the problem by including the files is
very unstable. Plus, since you are the developer and you are going to
test it, you would know if you included the files or not by using an
error alert.

--
Robert Rainwater

On 4/5/2001, 11:45:46 PM EST, Michael wrote about "[Dynapi-Dev] Whole New Tangent":

> I was getting annoyed with the loading times and the need for including
> every file manually.

> I also wanted a method of loading code dynamically and on an as needed
> basis so that I didn't need to reload the page just to load a new
> widget.

> I'm almost there. (threads in ns4 are giving me problems at the moment)

> The attached code is a highly altered version of the api.  It is not
> using the most recent version but I have attempted to use the latest
> code without rewritting the code around the DynAPIX structure.

> I also wanted a more logical method of structuring the objects and
> widgets.

> All code is now included in the DynAPI.onLoad method.  this means that
> all the code is executed after the page has finished rendering the
> inline content.

> I am in the process of converting all of my widgets across.  I have
> successfully been able to test for a particular object, and if it is not
> loaded, load it before creating the new widget.

> This can be seen in the api.create example in that only the api.layer.js
> file is needed.  The code them automatically loads the required
> DynGUI.Object and DynGUI.Document objects.

> All of the base objects are now referenced using the DynGUI.xxx
> method.   This should make it possible to simply delete these onUnLoad.

> All event handling is done in the DynEvent section.  All various types
> of event code now branch of this single object.  This also should allow
> for deletion and memory being freed up.

> Be Warned: NS6 is still not supported at the moment and neither is
> MacIE.

> I can make the more complete code available to anyone who wants it, just
> email me.
> --
> Michael Pemberton
> [EMAIL PROTECTED]
> ICQ: 12107010

_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
 

Reply via email to