I wonder if someone can help me figure out a problem
I'm having with
using an XML object as a dataProvider. It seems that if I refresh the
XML object with identical data then it will freeze up the tilelist.
However, if I use a standard Object, it always updates the tilelist even
if the data is the same. With the attached code, if I am using the XML
version and click the button 2 or more times it will cause my tilelist
to stop working. However, if I use the Object class and not the XML
class, then it works fine. The same thing occurs if I use
XMLListCollection and ArrayCollection. Is this a bug or just something
I don't understand about binding to an XML object? Thanks in advance if
anyone knows the answer.
-Ethan Farmer
----------------------------------------------------------
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
[Bindable]
public var boundObject:XML = <object><item>text</item></object>;
//public var boundObject:Object = {item:"text"};
private function handleClick():void{
var now:String = new Date().day.toString();
boundObject = <object><item>{now}</item></object>;
//boundObject = {item:now};
}
]]>
</mx:Script>
<mx:TileList id="tl" dataProvider="{boundObject.item}"/>
<mx:Button id="testButton" click="handleClick()"
/>
</mx:Application>
----------------------------------------------------------