debug mode and for (n in object) loop


hi,

i have next loop read xml nodes array. funny
(not) thing looses 1 node when run loop in debugging
mode. know there problems debugger 1
new me.

does debugger have influrence in stepping through elements
of object for..in routine?

my code:

xmldata = this.childnodes[1];
for (n in xmldata.childnodes){
obj = xmldata.childnodes[n];
obj.attributes.value != undefined){

// !!breakpoint in next line ...
if (obj.attributes.value != undefined){
_global.strary[obj.nodename] = obj.attributes.value;
trace("node " + obj.nodename + " " + obj.attributes.value);
}else{
trace("!node " + obj.nodename + " " + obj.attributes.value);
}

}


thanks info ..


there 1 line code looks this. problem
is still there:

xmldata = this.childnodes[1];
for (n in xmldata.childnodes){
obj = xmldata.childnodes[n];

// !!breakpoint in next line ...
if (obj.attributes.value != undefined){
_global.strary[obj.nodename] = obj.attributes.value;
trace("node " + obj.nodename + " " + obj.attributes.value);
}else{
trace("!node " + obj.nodename + " " + obj.attributes.value);
}

}


i tried simulate same array problem didn't occur.


More discussions in ActionScript 1 and 2


adobe

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support