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

    Unable to Access listData for Custom TileList ItemRenderer


      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).




      <?xml version="1.0" ?>
      <!-- itemRenderers\htlist\myComponents\Thumbnail.mxml -->
      <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"
          verticalGap="0" borderStyle="none" backgroundColor="white" >
                  import mx.automation.tabularData.TileBaseTabularData;
                  import mx.controls.TileList;
                  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:Image id="image" source="{NoPic}"/>
          <mx:Label id="playerName" text="{data.displayName}" width="120" textAlign="center"/>