Hi Steve, invalidateList() tells the component that it needs to refresh it's rows on the next update, but that doesn't mean that the component will reload it's data.
You'll either have to use databinding, or update the templateMenu's dataprovider property once you make changes to arrayDP. with databiding: You'll have to use the [Bindable] metadata tag when declaring arrayDP. [Bindable] private var arrayDP:Array; and use BindingUtils to set the dataprovider: BindingUtils.bindProperty(templateMenu, "dataprovider", this, "arrayDP"); or, each time you change arrayDP, you can re-assign it as the templateMenu's dataprovider. Hope this helps, Tibor. www.tiborballai.com --- In [email protected], "steveb805" <quantumcheese...@...> wrote: > > Hi, actually I don't think that's supported for arrays, only > arraycollections. It was my original code, but when running the app, you get > a runtime error that refresh is not a function. Thanks though. > > --- In [email protected], "invertedspear" <invertedspear@> wrote: > > > > I don't think I've done what you described before, but I think you should > > try refreshing the dataprovider. "arrayDP.refresh();" > > > > --- In [email protected], "steveb805" <quantumcheesedog@> wrote: > > > > > > invalidateList is invalidating my mood ... no it's not that bad. > > > > > > I have a popUpButton: > > > > > > templateMenu = new Menu(); // global var > > > templateMenu.labelField = "name"; > > > templateMenu.dataProvider = arrayDP; > > > templateMenu.selectedIndex = 0; > > > templateMenu.showRoot = true; > > > templatePopUpButton.popUp = templateMenu; > > > > > > > > > Occassionally, I do an arrayDP.push(some object); > > > > > > I'd like the popUp's menu to immediately show this new item. > > > > > > I tried templateMenu.invalidateList(), but this is not working. > > > > > > The flash develop doc/hint says that invalidateList: "refresh all rows on > > > the next update" > > > > > > How do you force the "next update". Is it invalidateDisplayList()? I > > > tried that, adding it after invalidateList, but that didn't work. > > > > > > eager to be enlightened, > > > Thanks, > > > Steve > > > > > >

