Refresh() is intended to re-apply a sort of filter to a collection.  If it
is working in your case it is a side effect.

 

I couldn't find your previous post to look at the code, but I still suspect
recycling issues.  For a combo box, you have to do two actions on set data
(actually  in commitProperties, of course).  You must re-assign to
dataProvider, and you must set the selectedIndex (you can only use
selectedItem if your items are simple strings or numbers).  Are you doing
both of those things?

 

I have an example on cflex.  It is more complex than necessary because I
wanted it to be generic:

http://www.cflex.net/showFileDetails.cfm?ObjectID=767

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Laurence
Sent: Saturday, February 06, 2010 4:29 AM
To: [email protected]
Subject: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working...

 

  

Well, I found a work-around...

I added the following code inside my ComboBox ItemRenderer:
override protected function focusInHandler(event:FocusEvent):void {
listOfFees.refresh();
}

For some reason, with this in there, you have to double-click on the combo
box to open it, but the drop-down shows the correct data 100% of the time.
Good enough for now.



--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Laurence" <lmacne...@...> wrote:
>
> Well, I installed FlashBuilder 4 Premium Beta 2, imported the project into
there, and ran the code.
> 
> It is EXACTLY THE SAME in FB3 and FB4 -- the exact same problem appears. I
scroll down in the DataGrid, and the numbers in the ItemRenderer's drop down
change (but not the selected number being displayed.) If I select one of the
incorrect numbers, the drop-down immedately changes to the correct numbers,
and the number I would've selected (had it been displayed correctly) shows
as the selected item in the combo box. It's just SO WEIRD!
> 
> So... What is that problem, exactly? Anyone able to figure it out? I'm
totally confused... It should be working! (See my earlier post for the code
-- I beg you, PLEASE help me figure this out!)
> 
> Thanks,
> Laurence MacNeill
> Mableton, Georgia, USA
> 
> 
> 
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Laurence" <LMacNeill@> wrote:
> >
> > 
> > 
> > --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com>
ups.com, Alex Harui <aharui@> wrote:
> > >
> > > I didn't take the time to debug your code, just looked for the usual
suspects and didn't see any. It was supposed to be fixed in 3.5 but somehow
got busted so now will be in 3.6 but not sure when that ships.
> > > 
> > > I didn't really want you to port the whole project, just write a test
case with Flex 4 to see if you are hitting that same problem, then we can
figure out what to do from there.
> > 
> > I will try that if the Array vs. ArrayCollection idea doesn't pan out...
Hate to go through all the trouble of installing Flex 4 Beta just for this,
though... Or can I just install the 4.0 SDK in my existing FlexBuilder Pro?
> >
>



Reply via email to