|
Mailing Lists
|
Home / Groups / Adobe Flex
how to catch a dynamically created custom component's event?What I have is a wrapper custom component as a Canvas containing a DataGrid with a custom item renderer in the 1st column. I'm inserting DataGridColumns into the DataGrid upon Canvas creationComplete. Inside my expandBtnRenderer, I have it dispatchEvent("expandBtnPressed",new Event("expandBtnPressed")); question is....where do i add the eventListener for my custom event "expandBtnPressed" ? my Canvas component: private function init():void { var myXBRFactory:ClassFactory=new ClassFactory(expandBtnRenderer); var newDGC:DataGridColumn=new DataGridColumn("expand"); newDGC.itemRenderer=myXBRFactory; var newCols:Array=new Array(); newCols.push(newDGC); dgHeader.columsn=newCols; } <mx:DataGrid id="dgHeader" dataProvider="{dataProvider}"/> |
February 11, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||