0 Replies Latest reply on Jul 9, 2008 12:22 PM by zoombapup

    Issues with binding an XML object

      Hi all.

      I'm doing a quick data editor for a game I'm working on using AIR and flexbuilder. Anyway, I've stored all the data in an XML object and I'm binding various controls to the XML object. But I've come across a weird issue when I update the data.

      Basically I create a datagrid thats bound to the XML (basically it reads a list of companies from the XML object). I also have a MXML form thats bound to the same data (only from a single company at the selected index of the datagrid).

      So its all working neatly, apart from one thing. When I select different rows from my datagrid, I'm getting strange behavior from my update function (which simply sets the XML objects values to the values in my form fields). Its as though there is some caching going on within the data binding thats essentially overriding my text edit fields .text properties.

      Strangely enough, the update works, but not the first time you select a new row from the datagrid.

      So I'm wondering if there is some method to use to invalidate any caching of data (its almost like the text is being retrieved from a cache and stored back into the edit fields text property).

      I'd added the MXML code for the app. Although the app reads an XML file in the storage directory so its unlikely you'll be able to run it. But if you need the xml, here it is:

      <companydesc>Some kind of description here</companydesc>
      <companydesc>This is another description</companydesc>
      <companydesc>Wingles another description</companydesc>

      Hope someone can shed some light here.