House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home / Groups / Adobe Flex

how to catch a dynamically created custom component's event?

Author:
Yuliang Ruan
02/05/2010 11:29 AM

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}"/>


Search flex

February 11, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29