I don’t see the problem with this example.  Except that day.toString() doesn’t change often enough to see the change when you click.  Change it to .hours and it clearly is not “frozen”

 

Tracy

 


From: [email protected] [mailto:[email protected]] On Behalf Of Ethan Farmer
Sent: Monday, August 28, 2006 4:08 PM
To: [email protected]
Subject: [flexcoders] XML Binding Problem

 

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>
----------------------------------------------------------

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




__,_._,___

Reply via email to