cayres
12-14-2007, 08:06 AM
I seem to have a problem with my attempt to rearrange some replicated data. Suppose we have a view "item" with a datapath that causes it to be replicated n times. Then as I understand it, the name "item" now refers to an LzReplicationManager instance containing two parallel arrays - nodes[] and clones[]. If I delete one of the nodes:
var thisnode=item.nodes[i];
removednode = item.removeChild(thisnode);
it all works fine, and the displayed clones reflect the change. However if I try to insert the removed node into a different position:
var thatnode = item.nodes[j];
item.insertBefore(removednode,thatnode);
the nodes[] array contains the elements in the intended order, but the clones[] array and the on-screen display no longer reflect this - in fact all elements of the clones[] array from the insertion point on become undefined.
I'd appreciate any suggestions of what I'm doing wrong here, and how one could make this sort of manipulation work as intended. Thanks,
Charles Ayres
var thisnode=item.nodes[i];
removednode = item.removeChild(thisnode);
it all works fine, and the displayed clones reflect the change. However if I try to insert the removed node into a different position:
var thatnode = item.nodes[j];
item.insertBefore(removednode,thatnode);
the nodes[] array contains the elements in the intended order, but the clones[] array and the on-screen display no longer reflect this - in fact all elements of the clones[] array from the insertion point on become undefined.
I'd appreciate any suggestions of what I'm doing wrong here, and how one could make this sort of manipulation work as intended. Thanks,
Charles Ayres