문제

here is a simplification of my problem. I'm trying to extract the number '11' below, but none of my trace statements print anything but empty strings. When I examine the list variable in the debugger, it is not null. Thanks!

var list:XMLListCollection = new XMLListCollection();
var x:XML = <property name="id" value="11" />
list.addItem(x);
trace ("list " + list);
trace ("list 0   " + list[0]);
trace ("value  " + list[0].(@value));
trace ("value  " + list[0].(@value).toString());
trace ("value  " + list[0].(@value).value);
trace ("value  " + list[0].(@value).toString());
도움이 되었습니까?

해결책

This works:

list[0].(trace(@value));

and this works:

list[0].(myCaptureValueFunction(@value));
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top