0 Replies Latest reply on Mar 3, 2009 5:51 AM by ephemerian

    How to debug bindings?

    ephemerian
      I have an application where the model under inspection in the UI changes as a result of calls to the server. To attach the controls in my UI to the values from the model, I'm using BindingUtils in my ActionScript to create the bindings when the model changes. This basically works in that I get the right field values displayed when I first set the model up, but the fields don't subsequently change when the model's values are updated.

      My question is: what are good strategies for inspecting and debugging the set of active bindings to see why they aren't working as expected? The API for ChangeWatcher is pretty limited on inspection methods, and I haven't been able to find another way of seeing what the Flash engine thinks the current bindings are.

      My second, more specific question, is: having set up the binding as follows:

      quote:

      /* Report the current page range as a string */
      [Bindable(event=PAGE_LABEL_UPDATED)]
      public function get pageLabel():String
      {
      trace( "in get pageLabel, count = " + count );
      ....


      if I subsequently test whether that event will trigger any changes:

      quote:

      trace( "Will trigger PAGE_LABEL_UPDATED = " + willTrigger( PAGE_LABEL_UPDATED ) );


      I always get false. I'm not sure whether that's correct behaviour or not, or whether it indicates that the binding I set up with BindingsUtil is somehow not taking.

      Anyway, any advice would be welcome.

      Thanks,
      Ian