8 Replies Latest reply on May 15, 2009 7:17 AM by Moenizzle

    CreationComplete event handler being called twice in custom item renderer for TileList

    Moenizzle

      I have a TileList with a custom item renderer:

       

       

      <mx:TileList

       

      id="_imageList" itemRenderer="com.technificent.renderers.ImageTileItemRenderer">

       

      The ImageTileItemRenderer is an MXML component that indicates a creationComplete handler in the root tag:

       

      <mx:HBox

       

      xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initComponent()" ...

       

      The problem is that initComponent is getting called twice for some reason.  The following code placed in initComponent:

       

      public function initComponent():void

      {

           trace(_someStringMember);

           _someStringMember = "testing";

      }

       

      results in the following:

       

      null

      null

       

      Any idea why this might be happening?

       

      Thanks in advance for your help!

      Moshe