2 Replies Latest reply on Oct 18, 2009 6:39 PM by justoliver

    Unable to Access listData for Custom TileList ItemRenderer

    justoliver Level 1

      I am trying to access the listData of a TileList but keep on getting an 'Unable to access listData from static VBox'. Does anyone have an idea where I am going wrong (I have include my code below).

       

      Thanks

       

      <?xml version="1.0" ?>
      <!-- itemRenderers\htlist\myComponents\Thumbnail.mxml -->
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
          horizontalAlign="center"
          verticalGap="0" borderStyle="none" backgroundColor="white" >
          <mx:Script>
              <![CDATA[
                  import mx.automation.tabularData.TileBaseTabularData;
                  import mx.controls.TileList;
                  [Embed(source="/assets/user.png")]
                  [Bindable]
                  public var NoPic:Class;
                  override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
                  {
                      super.updateDisplayList(unscaledWidth, unscaledHeight);                
                      var o_ListData:TileBaseTabularData = TileBaseTabularData(super.listData);
                      var o_List:TileList = TileList(ListData(listData).owner);
                                      
                  }            
              ]]>
          </mx:Script>
          <mx:Image id="image" source="{NoPic}"/>
          <mx:Label id="playerName" text="{data.displayName}" width="120" textAlign="center"/>
      </mx:VBox>