Unfortunately, that won't work...  This is part of a larger project, and that 
would mean migrating the entire project to Flex 4.  Not gonna happen, 
unfortunately...

I *am* using the Flex 3.5 SDK for this, however...  Wouldn't they have fixed 
any issues, if they found them when creating Flex 4?  Or maybe not...  Not real 
sure what 3.5 fixed from 3.2...

But I am assuming that, from your response, you can't find anything wrong with 
my code?  It should work, but for some reason it just doesn't, right?

--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> Try the Flex 4 prerelease build.  You might be hitting a combobox issue that 
> is fixed in Flex 4.
> 
> 
> On 2/4/10 8:41 AM, "Laurence" <lmacne...@...> wrote:
> 
> 
> 
> 
> 
> 
> I thought I had this figured out...  But apparently I don't...
> 
> Can someone please tell me why this won't work as a custom ItemRenderer?  I 
> scroll up and down, and the selected value in the ComboBox does NOT change, 
> but the values in the drop-down DO change.  I'm at a loss as to why...
> 
> BEGIN CODE:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:ComboBox xmlns:mx="http://www.adobe.com/2006/mxml";  height="100%" 
> width="100%"
>  dataProvider="{listOfFees}" labelFunction="formatLabel" 
> change="changeHandler(event)"
>  openDuration="0" closeDuration="0">
> <mx:Script>
> <![CDATA[
> import mx.formatters.CurrencyFormatter;
> import mx.controls.DataGrid;
> import flash.events.Event;
> 
> [Bindable]private var listOfFees:Array;
> 
> public override function set data(value:Object):void{
>  super.data = value;
>  if (value == null) {
>  listOfFees = null;
>  } else {
>                 if (data.comp != "y") {
>                 listOfFees = data.course_fees.concat();
>                 } else {
>                 listOfFees = new Array([0]);
>                 }
> 
>                 if (data.editable == "y") {
>                 this.enabled = true;
>                 } else {
>                 this.enabled = false;
>                 }
> 
>                 this.selectedItem = data.fee_chosen;
>  }
>  }
> 
> private function formatLabel(item:Object):String {
> return currencyFormat.format(item);
> }
> 
> public function changeHandler(event:Event):void {
> data.fee_chosen = this.selectedItem;
> }
> 
> ]]>
> </mx:Script>
> 
> <mx:CurrencyFormatter id="currencyFormat" precision="2"/>
> 
> </mx:ComboBox>
> 
> 
> 
> 
> 
> 
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs.adobe.com/aharui
>


Reply via email to