evilstrike
07-10-2007, 03:46 PM
Hi, Im getting the following warning when running my Flex application
warning: unable to bind to property 'image' on class 'Object' (class is not an IEventDispatcher)
What I have is a flex TileList control that I use to create a thumbnail gallery with pictures located on a remote server via HTTP. I created a thumbnail component called thumbnail.mxml (i used this from an example in the Adobe Livedocs)
thumbnail.mxml
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Image id="image" source="{data.image}"/>
<mx:Label text="{data.caption}"/>
</mx:VBox>
Here is the code from my main gallery where I declare "thumbs" as being an ArrayCollection. And my TileList uses "thumbs" as its dataprovider and "thumbnail" as its ItemRenderer.
gallery.mxml
<mx:Script>
<![CDATA[
[Bindable] public var thumbs:ArrayCollection = new ArrayCollection();
]]>
</mx:Script>
<mx:TileList id="myList" dataProvider="{thumbs}"
itemRenderer="thumbnail" >
</mx:TileList >
And here is what I used to populate the "thumbs" array with values taken from my database via AMFPHP
thumbs.addItem({image:path,
caption:caption,
artist:artist,
nbh:nbh,
parent:parent,
type:type,
date_taken:date_taken,
date_uploaded:date_uploaded,
desc:desc,
literal:literal,
symbolic:symbolic,
metaphore:metaphore
});
The whole code works and the pictures and data showup nicely in the TileList but for each generated thumbnail I get the warning mentionned above and im not sure at all what it means and if I can fix it. The reason I ask this is because I find the rendering to be a bit slow and I thought that this warning might have something to do with it.
warning: unable to bind to property 'image' on class 'Object' (class is not an IEventDispatcher)
What I have is a flex TileList control that I use to create a thumbnail gallery with pictures located on a remote server via HTTP. I created a thumbnail component called thumbnail.mxml (i used this from an example in the Adobe Livedocs)
thumbnail.mxml
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Image id="image" source="{data.image}"/>
<mx:Label text="{data.caption}"/>
</mx:VBox>
Here is the code from my main gallery where I declare "thumbs" as being an ArrayCollection. And my TileList uses "thumbs" as its dataprovider and "thumbnail" as its ItemRenderer.
gallery.mxml
<mx:Script>
<![CDATA[
[Bindable] public var thumbs:ArrayCollection = new ArrayCollection();
]]>
</mx:Script>
<mx:TileList id="myList" dataProvider="{thumbs}"
itemRenderer="thumbnail" >
</mx:TileList >
And here is what I used to populate the "thumbs" array with values taken from my database via AMFPHP
thumbs.addItem({image:path,
caption:caption,
artist:artist,
nbh:nbh,
parent:parent,
type:type,
date_taken:date_taken,
date_uploaded:date_uploaded,
desc:desc,
literal:literal,
symbolic:symbolic,
metaphore:metaphore
});
The whole code works and the pictures and data showup nicely in the TileList but for each generated thumbnail I get the warning mentionned above and im not sure at all what it means and if I can fix it. The reason I ask this is because I find the rendering to be a bit slow and I thought that this warning might have something to do with it.