--------------------------------------------------------------------------------
I have an XMLConnector attached to a xml file and bound to a label. This is
working fine.
My question is:
How do I access the data values in a component or the XMLConnector through
actionscript. I can see the values in their components so I know the data
binding worked.
Whatever I try returns undefined or null for the value.
Different things I tried:
// I tried getting it directly out of the data holder - returned undefined.
var postions:Number = dh_rack.mountingPositions;
//Tried getting it out of the XML Connector.
import mx.data.binding.*;
var dataTypeObj:mx.data.binding.DataType = this.xmlConn.getField("results",
"rack.positions");
var test = dataTypeObj.getAsNumber();
var positions3 = dataTypeObj.getAnyTypedValue().value;
Any help would be appreciated.
gurthWERM - 25 Apr 2006 18:26 GMT
I believe you have to use the following syntax:
var positions:Number = dh_rack.data.mountingPositions
or
var positions:Number = dh_rack.data
Good luck. I never get replies for my posts except from myself.