By 'recreate' I mean that I created an object and added to an layer using 
.addChild(myObj). Then I deleted it using myObj.deleteFromParent(). Then I 
created another object using addChild(anothObj).

This sequence of events resulted in the if (recycled && recycled.length>0) 
statement of dynlayer.js being true & a alert(this.elm) at this point gives 
me the huge output...whereas when that conditional was not true, the 
this.elm alert (done later, since we didn't fall into that code block) gives 
[layer Object].

The links you sent didn't seem to work for me. It may be because I'm using 
hotmail, I dunno. Maybe I'll be able to see what you were doing with a view 
source.

Thanks,
-James


>From: "ToddNY" <[EMAIL PROTECTED]>
>To: "James Musick" <[EMAIL PROTECTED]>
>CC: <[EMAIL PROTECTED]>
>Subject: Re: [Dynapi-Help] .addChild() Netscape 4.7 bug??
>Date: Wed, 25 Sep 2002 17:09:50 -0400
>
>What do you mean by "recreate"?
>Here's an example I made using nested addChild() and removeFromParent()
>Is this what you're doing?
>Todd.
>(Created from the "dynapi.api.delete.htm"  example which doesn't nest...)
>
>===========================
>
><html>
><head>
><title>DynAPI Distribution: DeleteDn : delete children/create children
>Example</title>
><script language="Javascript" src="../src/dynapi.js"></script>
><script language="Javascript">
>DynAPI.setLibraryPath('../src/lib/');
>DynAPI.include('dynapi.api.*');
></script>
><script language="Javascript">
>
>function MakeLayer(){
>     var pops = DynAPI.document;
>     var clrIndex = 0;
>     var x = 50;
>     var y = 50;
>
>     while (pops.children.length>0) {
>         pops = pops.children[pops.children.length-1];
>         clrIndex++;
>     }
>     if (clrIndex>0) {
>         clrIndex = clrIndex%clrs.length;
>         x = y = 4;
>     }
>     var h = pops.getHeight()-2;
>     var w = pops.getWidth()-2;
>
>     var dlyr = new DynLayer(null,x,y,w,h,clrs[clrIndex].c);
>     pops.addChild(dlyr);
>}
>
>function DeleteLayer(){
>     var pops = DynAPI.document;
>     while (pops.children.length>0) {
>         pops = pops.children[pops.children.length-1];
>     }
>     if (pops==DynAPI.document) {
>        alert('All layers are removed.');
>        return;
>     }
>     pops.deleteFromParent()
>}
>
>var clrs = new Array(
>{c:'#000000',t:0},{c:'#000055',t:0},{c:'#0000aa',t:0},{c:'#0000ff',t:0},
>{c:'#005500',t:0},{c:'#005555',t:0},{c:'#0055aa',t:0},{c:'#0055ff',t:0},
>{c:'#00aa00',t:0},{c:'#00aa55',t:0},{c:'#00aaaa',t:0},{c:'#00aaff',t:0},
>{c:'#00ff00',t:0},{c:'#00ff55',t:0},{c:'#00ffaa',t:0},{c:'#00ffff',t:0},
>
>{c:'#550000',t:0},{c:'#550055',t:0},{c:'#5500aa',t:0},{c:'#5500ff',t:0},
>{c:'#555500',t:0},{c:'#555555',t:0},{c:'#5555aa',t:0},{c:'#5555ff',t:0},
>{c:'#55aa00',t:0},{c:'#55aa55',t:0},{c:'#55aaaa',t:0},{c:'#55aaff',t:0},
>{c:'#55ff00',t:0},{c:'#55ff55',t:0},{c:'#55ffaa',t:0},{c:'#55ffff',t:0},
>
>{c:'#aa0000',t:0},{c:'#aa0055',t:0},{c:'#aa00aa',t:0},{c:'#aa00ff',t:0},
>{c:'#aa5500',t:0},{c:'#aa5555',t:0},{c:'#aa55aa',t:0},{c:'#aa55ff',t:0},
>{c:'#aaaa00',t:0},{c:'#aaaa55',t:0},{c:'#aaaaaa',t:0},{c:'#aaaaff',t:0},
>{c:'#aaff00',t:0},{c:'#aaff55',t:0},{c:'#aaffaa',t:0},{c:'#aaffff',t:0},
>
>{c:'#ff0000',t:0},{c:'#ff0055',t:0},{c:'#ff00aa',t:0},{c:'#ff00ff',t:0},
>{c:'#ff5500',t:0},{c:'#ff5555',t:0},{c:'#ff55aa',t:0},{c:'#ff55ff',t:0},
>{c:'#ffaa00',t:0},{c:'#ffaa55',t:0},{c:'#ffaaaa',t:0},{c:'#ffaaff',t:0},
>{c:'#ffff00',t:0},{c:'#ffff55',t:0},{c:'#ffffaa',t:0},{c:'#ffffff',t:0});
>
></script>
></head>
>
><body>
><a href="javascript:MakeLayer()">Make layer</a><br>
><a href="javascript:DeleteLayer()">Delete layer</a>
>
></body>
></html>
>
><< dynapi.api.deleteDn.htm >>




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Dynapi-Help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dynapi-help

Reply via email to