--- In [email protected], "gwangdesign" <gwangdes...@...> 
wrote:
>
> I am trying to bind a property ("label") in my data object so that 
the
> changes on it can be "propagated" to all the views (The controls may
> want to edit this property). Currently I am wrapping them as plain
> objects in ArrayCollection and I got the following warning:
> 
> "warning: unable to bind to property 'label' on class 'Object' 
(class
> is not an IEventDispatcher)"
> 
> Does the compiler suggest making the Object a subclass of
> IEventDispatcher? How do I do it if so?
> 
> My code is as below. Thanks!
> 
> <mx:ArrayCollection id="taskList">
>               <mx:Object label="Word"/>
>               <mx:Object label="Media Player"/>
>               <mx:Object label="Contacts"/>
>               <mx:Object label="Apache Server"/>
>               <mx:Object label="Dictionary"/>
>               <mx:Object label="iTunes"/>
>               <mx:Object label="Solitaire"/>
>               <mx:Object label="Minesweeper"/>
>               <mx:Object label="Safari"/>
>               <mx:Object label="RSS Reader"/>
>       </mx:ArrayCollection>
>       <mx:VBox>
>               <mx:Repeater id="myRP" dataProvider="{taskList}" 
recycleChildren="true">
>                       <mx:Button horizontalCenter="0"
> label="{String(myRP.currentItem.label)}"
> click="button_ClickHandler(event);"/>
>               </mx:Repeater>
>       </mx:VBox>
>
IEventDispatcher is not a Class, but an Interface. Maybe this will 
help:
http://flexdiary.blogspot.com/2008/11/implementing-
ieventdispatcher.html

Reply via email to