> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of 
> Scott Andrew
> LePera
> Sent: Wednesday, December 27, 2000 6:22 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] loadpanel troubles...
> 
> 
> Hi Mark,
> 
> The queue in LoadPanel (and the old loadHTML extension) basically
> ensures that multiple load requests happen one after the 
> other, instead
> of all at once.  Both Netscape and IE seem to have troubles processing
> multiple load requests.  The queue was created to make sure 
> all requests
> were taken care of one at a time.  

By multiple load requests, do you mean if I do something like:

lp.add('foo.html');
lp.add('bar.html');

and the browser goes to fetch 'bar.html' before it's finished receiving the content 
for 'foo.html' ?  This doesn't make much sense to me since fetching the document 
happens sequentially.

I guess that my thinking was that the queue would hold all the docs to fetch or that 
have been fetched, and once a doc have been added then flipping between them (ie. an 
href that has an lp.add('foo.html')) would be a matter of show/hiding the appropriate 
index in the Array.  I guess I must be way off on this one.

> When a URL is loaded it disappears from the queue.

Yes, I do see that, but the Array for the queue keeps growing.  Every time 'add' is 
called, all the elements in the array holds the same thing.  Putting the following 
code in the LoadQueue.prototype.loadNext function will show you what I mean (if your 
interested...:).

        var str = "";
        for(var i=0; i<this.queue.length; i++) {
                str += "queue["+i+"] "+this.queue[i]+"\n"+"this.index: 
"+this.index+"\n";
        }
        alert(str);

Any ideas on how to fix this ??


> 
> With the current widget model, you can't overwrite methods and call
> their super methods like you can in Java.  You have to preserve the
> original method, like this:
> 
> myFoo.prototype.origSetURL = LoadPanel.prototype.setURL;
> myFoo.prototype.setURL = function(url){
>   this.origSetURL(url);
> }

Sounds like a workable thing to me.

> 
> If you're using the SuperClass object (I don't know if it's 
> included in
> the current distro) you can do "this.Super.setURL" -- the SuperClass
> object simulates Java's inheritance scheme.  But you'd have to change
> your widget to use it.
>

Thanks.  I'll investigate this option.
 
> Unless someone puts comments in the code, there's no way to tell if a
> method is private or public.  I assume "getFileScope" is internal, but
> only because I've never had to call it myself.  Digging 
> through the code
> may give you clues.
>

Bummer.  It sure would be nice to have some sort of convention (ie. 'private' methods 
always start with in underscore).  That way trudging through code would be a little 
easier.

-Mark Haviland
�v��7�����x%��C�v��7��+-��.�ǟ����a���X���(��~��zw��f��f��X��)ߣ�r��bu�

Reply via email to