Joe,

Scoping issues...

http://livedocs.macromedia.com/flex/2/docs/00000843.html

Brendan



On 7/6/06, g8torjoe <[EMAIL PROTECTED]> wrote:

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




__,_._,___

Reply via email to