If your problem is similar to that discussed on -

http://forums.adobe.com/message/2642802


Override the combobox class in a custom component and add the following code
-

private var mDropDown:ListBase;
override public function set dataProvider(value:Object):
void
  {
    super.dataProvider = value;
   //Bug in Flex SDK 3.5: Once the data provider is set and list base is
created
   //change in dataProvider does not reflect change in shared dataProvider
of listbase
   mDropDown = dropdown;
        if(mDropDown)
        {
         validateSize(true);
         mDropDown.dataProvider = super.dataProvider;
         if(isNaN(preferredDropDownWidth))
          mDropDown.width = width;
         else
          mDropDown.width = preferredDropDownWidth;

        }
  }

The problem is also solved in 3.6 sdk .

Thanks,
Peeyush
Adobe Certified Expert
http://www.metadesignsolutions.com


On Fri, Jun 4, 2010 at 6:47 PM, Angelo Anolin <angelo_ano...@yahoo.com>wrote:

>
>
> hi Alex,
>
> Prior to SDK 4, is there a build after 3.5?
>
> Thanks for this info. I can't seem to get the way out of this and it dawned
> on me now that it must have been a bug.
>
> Thank you.
>
> angelo
>
> ------------------------------
> *From:* Alex Harui <aha...@adobe.com>
> *To:* "flexcoders@yahoogroups.com" <flexcoders@yahoogroups.com>
> *Sent:* Fri, 4 June, 2010 0:03:37
> *Subject:* Re: [flexcoders] Modify Flex ComboBox DataProvider
>
>
>
> There’s a bug like that in Flex 3.5.  Older and newer versions don’t have
> that problem.
>
>
> On 6/3/10 1:56 PM, "Angelo Anolin" <angelo_anolin@ yahoo.com> wrote:
>
>
>
>
>
>
> I am finding some issues when I am trying to change a combobox's data
> provider.
>
> I have a checkbox that would trigger whether a combobox would use an
> xmlListCollection of all Locations (xmllcAll) or an XMLListCollection of
> just a subset of locations (xmllcSubset) .
>
> In the change event of my checkbox, I have defined:
>
> private function checkBox1_change( e:Event) :void
> {
>   if (e.currentTarget. selected == true)
>   {
>     comboBox1.dataProvi der = xmllcAll;
>   }
>   else
>   {
>     comboBox1.dataProvi der = xmllcSubset;
>
>   }
> }
>
> By default, the comboBox's default dataProvider is the xmllcSubset.  When I
> tick the checkbox, I expect that the data for the combobox should now map to
> the data for the xmllcAll variable.  The comboBox does not get the proper
> values.  Is there anything that I need to do to refresh the comboBox and
> make the values that appear on the list those that were in the the proper
> xmllistcollection?
>
> Thanks.
>
> Angelo
>
>
>
>
>
>
>
> --
> Alex Harui
> Flex SDK Team
> Adobe System, Inc.
> http://blogs. adobe.com/ aharui <http://blogs.adobe.com/aharui>
>
>
>  
>

Reply via email to