Skip navigation
Currently Being Moderated

Undefined property data in inline itemrenderer

Sep 30, 2013 6:21 PM

I get:-

 

1120: Access of undefined property data.

in the following code:-

 

<?xml version="1.0" encoding="utf-8"?>

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"

                    xmlns:s="library://ns.adobe.com/flex/spark"

                    title="HomeView">

 

<fx:Script>

                    <![CDATA[

                              import mx.collections.ArrayCollection;

 

                              [Bindable]

                              private var imageList:ArrayCollection;

                    ]]>

</fx:Script>

 

          <s:List dataProvider="{imageList}" width="100%" height="100%">

  <s:layout>

  <s:TileLayout/>

  </s:layout>

  <s:itemRenderer>

  <fx:Component>

              <s:BitmapImage source="{data.image}" width="150" height="150"/> <!-- HERE -->

  </fx:Component>

  </s:itemRenderer>

</s:List>

 

</s:View>

 

 

I'm using Flex 4.10 but I tried against 4.6 and I still get this error.

 

I've no problems before in creating inline item renderers, so what am I missing here?

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points