I would like to know how to send an array of strings to the a
comboBox dataProvider which is acting as an itemEditor for my
DataGrid. Here is some code:
initVars is called on creationComplete:
-------------------------------
<mx:Script>
<![CDATA[
[Bindable]
public var allDescriptions:Array;
private function initVars():void{
artService.getDescriptions();
}
private function getDescriptionHandler(event:ResultEvent):void{
allDescriptions = event.result as Array;
}
]]>
</mx:Script>
-----------------------------------------
<mx:RemoteObject id="artService" destination="ColdFusion"
source="MyFirst.ARTGateway" showBusyCursor="true">
<mx:method name="getDescriptions" result="getDescriptionHandler
(event)" fault="Alert.show(event.fault.message)" />
</mx:RemoteObject>
---------------------------------------------
<mx:DataGridColumn id="descriptionField" dataField="DESCRIPTION"
headerText="Description" editorDataField="myData">
<mx:itemEditor>
<mx:Component>
<comp:descriptionEditor dataProvider="{allDescriptions}" />
</mx:Component>
</mx:itemEditor>
</mx:DataGridColumn>
--------------------------------------------
The bolded text is me trying to send the public array
"allDescriptions" into the dataProvider for my itemEditor? Flex
however returns a line edit "Access of undefined property
allDescriptions". How do I send this array?
----------------
Kyle Hayes
RIA / ColdFusion Developer
The Boeing Company