What do you mean Robert?? Is THAT good news?? LOL
Obviously it is not handled by the DynAPI, because 
the deleteChild function instead of hiding the layer
does a "delete c" as we know already.

If what you say were true, then THAT shouldn't be happening.

simple!

Correct me if I am wrong, but people should then bare in mind that
it's not being handled for Netscape at this very moment, although 
it was intended to have been, and will be probably some time in the
future. For the time being, I guess, people should be doing a 
removeChild() and a setVisible(false).

I was not aware of the built-in recycling and haven't got the faintest 
as to how to use it, although I am sure that it would be very usefull.

Deli Joannou


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Robert
Rainwater
Sent: 17 June 2001 05:14
To: D. Joannou
Subject: Re[5]: [Dynapi-Dev] Attention...



All of this is already handled by the DynAPI.  If you look at the code
you will see that when you remove a layer in NS 4 is hides the layes
and puts it in a recycled array so that it can be used later.  I'm not
sure what the bad news is.  NS4 has always been this way.

-- 
Robert Rainwater


On 6/16/2001, 11:30:24 PM EST, D. wrote about "[Dynapi-Dev] Attention...":

> BAD NEWS PEOPLE - Unless what I have found out is not true (I wish)!

> I have also been plagued by the deleteChild/deleteFromParent syndrome,
> on several occasions and had to resort to work-arounds.
> Tonight I came accross it again writting a dynamic explorer-like tree
> structure.
> I really need to DELETE the children cause the REMOVE acts a bit funny in
> Netscape.

> Have a look at this...
> http://www.faqts.com/knowledge_base/view.phtml/aid/7260/fid/53 and
> http://www.faqts.com/knowledge_base/view.phtml/aid/7232/fid/53

> they say:

> "You can dereference an object (whose memory may then be reclaimed by the
> garbage collector) by assigning it to null ("myObject=null"), or by
> applying the delete operator to it ("delete myObject"). However, layers
> in NN4 are a permanent part of the HTML code, thus they can't be
> disposed of. Remember that NN4 only allows modifications to the page
> code in loading time, and that every piece of HTML you write (with
> document.write()) appears and behaves like if it was hardcoded.

> All you can do is hiding them (with
> document.layername.visibility='hide'), but that doesn?t help since the
> layers are still there for all counts--except that they can't be seen."

> and

> "You can't deleta a layer, but you can hide it so it will be invisible to
> the user. Simply add
>   document.layers['myLayer'].visibility='hide';
> in your script to hide it ('myLayer' is the name of your layer in the
> HTML code).

> Conversely,
>   document.layers['myLayer'].visibility='show';
> will show your layer again.

> This only works in NS4.x."


> If this is TRUE, then it is BAD NEWS as I said, and all that's left is
> REALLY,
> 1. scrap Netscape 4.x and concentrate on 6.x or
> 2. recycle!!

> Deli Joannou

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Stephan
> Tolksdorf
> Sent: 16 June 2001 12:44
> To: Robert Rainwater
> Subject: Re[3]: [Dynapi-Dev] Attention...


>> I will fix the bug soon.  However, your fix does not delete the
>> object, but the array element.

> As I understand it, delete doesn't delete an object but cuts the
> variable (or the attribute) and therefore the reference out of the
> namescape.

>> I believe this would cause a memory
>> problems.

> That depends on whether local variables get garbage collected after
> gone out of scope. I don't think that browsers will have a problem
> with this.

> But you can still assign null instead of deleting.
> __
> c.del()
> this.children[i] = this.children[l-1];
> this.children[l-1] = null;
> this.children.length--;
> c = null // instead of delete c
> __

> This would work for Netscape.


> Stephan


> PS: Didn't want Jeff Greenberg to write a tutorial about memory
> optimization?


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


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


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


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

Reply via email to