Hi, Andrey wrote: > Sure! > > my list is defined as follows: > > <mx:List id="lstData" width="100%" height="100%" > labelField="@name" ></mx:List> > > In my component (well, class) i have the following variable: > > [Bindable] > public var MyDataList:XMLList = new XMLList(); > > then when the application loads and i get the instance of the component, i > call the following: > lstData.dataProvider = mycomponent.MyDataList; > > everything looks ok so far, right? then then when i receive a proper xml, i > update it all inside the component: > > MyDataList = new XML(myxmlstring).children(); > > theoretically the lstData should somehow receive notification that the > dataProvider has been updated and refresh itself, right? this doesn't seem > to work. Since this doesn't seem to work we're reserved to throwing events > from the component to the list and rebinding the list when that event is > caught by the gui, but the whole thing is pretty cumbersome and i think > this > should work automatically.... what are we doing wrong? >
I'm pretty green with this stuff so I might be wrong here... It looks like you are really changing the dataProvider - not the actual data. Perhaps if you try calling, lstData.dataProvider.refresh(); when you update the list it might refresh the view. I dont know, this is just a guess. As an aside, you might want to consider changing the name of your MyDataList variable to "myDataList" and lstData(which looks like it starts with a one rather than a lowercase L) to "listData", which you can read easily. I dont think that one character is going to slow you down much in typing speed but makes the code much more readable. HTH. cheerio, - shaun

