I expected that binding a data variable to a UI component would result in (a) the UI component being automatically initialized using the variable's value and (b) the variable's value being changed to reflect the UI component's current state whenever that state changed.
The accompanying example doesn't work that way. The variables aren't updated as the HSlider and DateChooser values are changed. However, changing one UI component's setting results in the bound variable being updated while another doesn't in my production code. What is the expected behavior? Is there a bug in the Flex data binding mechanism? It appears to be flaky. <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > <mx:Script> <![CDATA[ [Bindable] public var numTest:Number = 1; [Bindable] public var dateTest:Date = new Date("Feb 1 2005"); public function sliderChanged(event:Event):void { trace("slider value = " + numTest); } public function dateChanged(event:Event):void { trace("date value = " + dateTest.toDateString()); } // The trace statements always indicate the // variables' values remain unchanged. ]]> </mx:Script> <mx:HSlider x="10" y="10" minimum="0" maximum="10" value="{numTest}" change="sliderChanged(event)"/> <mx:DateChooser x="10" y="30" selectedDate="{dateTest}" change="dateChanged(event)"/> </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 Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

