Problem solved :-) It seems that something similar to a race condition happened as i was changing both the data provider AND the item renderer at the same time.
The solution is to use call later in the switch method: pseudo: switch() { list.dataProvider = aDataProvider ; callLater(switchRenderer,[theRenderer]) ; } On Mon, Feb 23, 2009 at 11:17 PM, fotis.chatzinikos < fotis.chatzini...@gmail.com> wrote: > Hello all, > > I a have a List component which at runtime I change its dataProvider > AND item renderer via a button click. > > Everything runs smoothly until new data are added to the data provider > that is current. The list picks up the change, but after this when i > try to switch to the second provider + renderer (via the button) i get > the following: > > TypeError: Error #1010: A term is undefined and has no properties. > at mx.controls::List/createItemRenderer() > at > mx.controls::List/ > http://www.adobe.com/2006/flex/mx/internal::getMeasuringRenderer() > at mx.controls::List/commitProperties() > at mx.core::UIComponent/validateProperties() > at mx.managers::LayoutManager/validateProperties() > at mx.managers::LayoutManager/doPhasedInstantiation() > at Function/http://adobe.com/AS3/2006/builtin::apply() > at mx.core::UIComponent/callLaterDispatcher2() > at mx.core::UIComponent/callLaterDispatcher() > > both item renderers and data providers are initialized and i can > switch between them without problems up to the point described earlier. > > Does it ring a bell? > > the switching code is the following: > > tileListID.itemRenderer = friendsActionsRenderer ; > tileListID.dataProvider = friendsDataProvider ; > > Thanks, > Fotis > > > -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,