1 Reply Latest reply on Jul 31, 2008 5:21 PM by Gregory Lafrance

    Help in binding data

    karoljouis Level 1
      In my project i have a component that gets data from the server and lists the task details. I have the following AS code and MXMl code to display a combobox for categories.

      [Bindable]
      private var taskCategories:ArrayCollection = new ArrayCollection([{label:"Morning",category_id:1},{label:"Evening",category_id:2}]);



      <mx:FormItem label="Category">
      <mx:ComboBox height="23" width="162" id="task_category" dataProvider="{taskCategories}"/>
      </mx:FormItem>



      Using Flex Debugger i found a warning

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

      Can anyone help on this issue. Thanks.
        • 1. Re: Help in binding data
          Gregory Lafrance Level 6
          The code you attached does not give me the warning in the debugger, but depending on how you use it, like if you use the data elements in a binding situation you might, because although the ArrayCollection uses binding, your data elements do not.

          If it is possible to provide a more complete, and yet still simplified, code example displaying the issue, we might be able to give more hints.