1 Reply Latest reply on Mar 20, 2008 1:35 AM by Sreenivas R

    AS3 Data Bindings on Custom Objects

    JayStang
      Hey Guys,
      I'm having an issue using BindingUtils.bindProperty to bind a label to a string that is located in a custom object, however it works perfectly fine in mxml.

      EXAMPLE:
      This Works:
      <mx:Label id="testLabel" text="{MainApplication.CONSOLE.currentItem.IssueName}" />

      This does not work:
      var testLabel = new Label();
      BindingUtils.bindProperty(testLabel,"text",MainApplication.CONSOLE.currentItem,"IssueName ");
      this.addChild(testLabel);

      The variable is set to be bindable. What happens is the first time in AS is it finds the correct text in that string, but any time the string is updated the label does not change. What is mxml doing differently here that i am doing wrong?

      Thanks,
      ~Jamie