I successfully query my database using WebOrb and return a php class like:

class returnItem {
var $part1;
var $part2;
.
.
var $part10;

}

I set a bindable object DataReturn:Object in ActionScript and set it
equal to the remote call returned object and then use the ActionScript
object as a dataprovider for a datagrid with corresponding columns to
the properties part1 etc.

<mx:DataGrid dataProvider="{DataReturn}">
<mx:columns>
<mx:DataGridColumn headerText="Part 1" dataField="part1"/>
etc.
<mx:DataGridColumn headerText="Part 10" dataField="part10"/>
</mx:columns>
</mx:DataGrid>

Everything works great and the datagrid populates. What I can't figure
out how to do, is to access the "DataReturn" object directly in
ActionScript. E.g.

[Bindable]
var ReturnData:Object = Remote Object;

function accessReturnProperty() : Number{
var num:Number = DataReturn.part1;
return num;
}

gives me nothing (actually NaN) even though the datagrid recognizes
the properties as datafields.

Any help on how to get at this object's properties "parts#" in
ActionScript from the returned object would be a help.

Thanks in advance.


Reply via email to