Scoping issues...
http://livedocs.macromedia.com/flex/2/docs/00000843.html
Brendan
I have a dataGrid control with an itemRenderer containing a button.
The button has a click handler which is defined as a private function
in the script tags. Every time I try to compile I get an error:
"1180: Call to a possibly undefined method orderItem." A PARTIAL
piece of the code is below. I can't seem to figure out why this is
happening. Thanks
<mx:DataGrid id="dgPart" dataProvider="{partList}" editable="false">
<mx:columns>
<mx:DataGridColumn id="partNum" headerText="Part #"
dataField="PART_NO" editable="false" width="75" sortable="true" />
<mx:DataGridColumn id="partName" headerText="Part Name"
dataField="PART_NAME" editable="false" width="450" />
<mx:DataGridColumn id="orderPart" headerText="Order">
<mx:itemRenderer>
<mx:Component>
<mx:Button width="15" height="15" toolTip="Add to Cart"
icon="@Embed('/assets/shoppingcart_add_16.png')" click="orderItem()" />
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
private function orderItem():void
{
var eventObj:CatalogEvent = new CatalogEvent("order");
dispatchEvent(eventObj);
}
__._,_.___
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
![]()
SPONSORED LINKS
Web site design development Computer software development Software design and development Macromedia flex Software development best practice
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
__,_._,___
- Re: [flexcoders] ItemRenderer with Button Brendan Meutzner
Reply via email to

