3 Replies Latest reply on Feb 17, 2008 3:42 PM by Michael_Latta

    Binding Hell

    MichaelLatta
      There does not appear to be much support for debugging bindings in the SDK. All the relevant classes do not expose the kind of data that would be needed. For example ChangeWatcher does not answer what the various values are that define it (host, target, property to set, property path to watch). I can also not find some central point where I can see all bindings that are firing to trace the data flow within the system.

      My specific case that is driving my nuts is as follows:
      1) I have an ArrayCollection of ObjectProxy objects that wrap plain old objects with properties set.
      2) I have an AdvancedDataGrid that displays this collection with 2 of the properties displayed as columns.
      3) I have a custom form class that is bound to the selection in the advanced data grid and has form items that are bound to various properties of the data object for the form which is bound to the selection.

      When a change is made to a form item in 3, it fires a property change event which I see in my debugging event handler. This is supposed to be bound to the form data object and as a result should update the Advanced data grid display. Changing the selection in the advanced data grid will update the item display the first time after a change, and does not do so thereafter. The form bound to the selection always shows the expected changed value. I even have a debugging function bound to the same value as the data provider on the grid to ensure that the data provider is not being altered unexpectedly.

      Any suggestions for how to determine what is really happening under the covers would be appreciated. Bindings are great when they work. But, figuring out why they are not working is still far from obvious.