Inside of an mxml file, I have a datagrid, with a Button item renderer as such:
<mx:DataGridColumn headerText="delete" textAlign="center" editable="false">
<mx:itemRenderer>
<mx:Component>
<mx:VBox horizontalAlign="center">
<mx:Button label="" icon="@Embed('../images/delete.png')" />
</mx:VBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
In that Button, I would like to call a function that exists in the same .mxml
file
public function deleteRow( data:XML ):void{
}
Unfortunately, if I edit the button to read like:
<mx:Button label="" icon="@Embed('../images/delete.png')" click="deleteRow(
data );" />
It writes that the function deleteRow doesn't exist, which I imagine is a scope
problem. How do I get around this?
Thanks in advance,
Alex
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create Web Applications With ColdFusion MX7 & Flex 2.
Build powerful, scalable RIAs. Free Trial
http://www.adobe.com/products/coldfusion/flex2/
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:3723
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37