add/removeChildren 
Author Message
 add/removeChildren

Hi,

Something that bothers me for quite some time now is how to
removeChildren and addChildren in the same JS function

for example I often use

somegroup.removeChildren = somegroup.children;
or
somegroup.children.length = null;

This works  but trying to addChildren to 'somegroup' afterwards inside
the
same function crashes the browser.
I guess, the order in which they're executed is not clear ?!

I have some workarounds but I'm not really satisfied with them.

Any ideas ?

Roland

.............................................................................

   Roland Praehofer - webdesign.sound.virtual_environments


   web: http://www.*-*-*.com/
   tel:+49 30 827 029 77
   fax:+49 30 827 029 78

.............................................................................



Sun, 27 Oct 2002 03:00:00 GMT  
 add/removeChildren

Quote:
>what browser are u running?

Cosmo on Mac,

Quote:
>i find using soemthing like this works fine:
>group.children = new MFNode()
>group.children = new MFNode(Browser.createVrmlFromString(Shape {...}))

I remember trying something like this  to update the 'string' field of a
Text-node
sometime ago and got some strange artefacts so I forgot about that.

But if say, you're successful using this, I might give it one more try.

However I'd like to know :

1.Is there a difference between

somegroup.addChildren = blabla;
and
somegroup.children = blabla;

?

2.Does assigning a new MFNode to the children field automatically remove
all of the previous (even if the length of the new children node is different
?).

thanks & all the best,

Roland



Mon, 28 Oct 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. addChildren & removeChildren and == problems

2. ** URGENT: removeChildren **

3. Please! Help with removeChildren

4. addChildren and removeChildren

5. Reclaiming Memory after removeChildren

6. addChildren/removeChildren in WorldView2.0/IE4.0

7. removeChildren crashing netscape

8. Probelems with removeChildren

9. removeChildren does not work!

10. Adding Strong Typing without adding to the Language

11. Where can I find a example of addChildren or/and removeChildren eventIn's?

12. how can I use "removeChildren" & vrmlscript (example, please, if possible)

 

 
Powered by phpBB® Forum Software