2 Replies Latest reply on Jul 16, 2006 4:51 PM by Castles

    class is not an IEventDispatcher

    Castles
      Ok, so I have been playing arround with flex and I'm really enjoying it so far. I have a small issue with running my application.. I have a component with the following code:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml"
      width="100" height="125" cornerRadius="25">
      <mx:Canvas cornerRadius="10" backgroundColor="0xFFFFFF"
      borderThickness="1" borderStyle="solid"
      borderColor="0xCCCCCC" width="80" height="80" x="10" y="10">
      <mx:Image width="48" height="48" source="{data.icon}"
      verticalCenter="0" horizontalCenter="0"/>
      </mx:Canvas>
      <mx:Label width="100" text="{data.name}" height="25"
      textAlign="center" y="100"/>
      </mx:Canvas>

      and I have a tile renderer that is using the component as an item render. It complies and runs fine but I keep getting the floowing warning...

      warning: unable to bind to property 'icon' on class 'Object' (class is not an IEventDispatcher)
      warning: unable to bind to property 'name' on class 'Object' (class is not an IEventDispatcher)

      for every item that is created.

      Have I missed something?

      Thanks