Hi! We ran into the same issue, the flex project was running properly in flex 2 but when we migrated to flex 3 we had the exact same issue as yours.
To fix that problem we got rid of these "new ClassFactory(...)", just define your renderers like that: <mx:TileList id="tilelist" dataProvider="{ac}" itemRenderer="mx.controls.Label" left="10" right="10" bottom="99" top="70"/> Hope this helps :) Damien --- In flexcoders@yahoogroups.com, "morgan.gustafsson" <[EMAIL PROTECTED]> wrote: > > Hi, > > I think I have found a bug in the TileList component but since I'm > new to Flex I would like a second opinion. > > If I filter or scroll a TileList with a custom item renderer, then > change state and back again I get the following error message: > > Main Thread (Suspended: TypeError: Error #1010: A term is undefined > and has no properties.) > mx.controls.listClasses::TileBase/createItemRenderer > > The action that causes the error is on line 1952 in TileBase.as: > delete freeItemRenderersByFactory[factory][renderer]; > > What it does it that its trying to recycle a itemRenderer that should > be available and then delete it from the Dictionary > freeItemRenderersByFactory. But somehow that IR is not present in the > Dictionary and it there fails. > > I've googled but didnt find anything about this so I'm starting to > think I messed something up. > > I've managed to reproduce the error with the following code. Just > copy and past, all in one file. > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute" xmlns:ns1="*" width="420" height="350"> > > <mx:states> > <mx:State name="dummyState"> > <mx:AddChild position="lastChild"> > <mx:Label text="Dummy state" > fontSize="30" verticalCenter="-25" horizontalCenter="0"/> > </mx:AddChild> > <mx:RemoveChild target="{linkbutton1}"/> > <mx:AddChild position="lastChild"> > <mx:LinkButton label="Show TileList > State" click="currentState=''" left="10" top="10"/> > </mx:AddChild> > <mx:RemoveChild target="{tilelist}"/> > <mx:RemoveChild target="{radiobutton2}"/> > <mx:RemoveChild target="{radiobutton1}"/> > </mx:State> > </mx:states> > > <mx:Script> > <![CDATA[ > import mx.controls.Label; > import mx.collections.ArrayCollection; > > [Bindable] private var ac : ArrayCollection = > new ArrayCollection([{name: "one"},{name: "two"}]); > > private function applyFilter() : void > { > ac.filterFunction = filter; > ac.refresh(); > } > > private function removeFilter() : void > { > ac.filterFunction = null; > ac.refresh(); > } > > private function filter( item : Object ) : > Boolean > { > return ( item.name == "one" ) ? > true : false; > } > ]]> > </mx:Script> > > <mx:RadioButton id="radiobutton1" > label="Show all" selected="true" > groupName="radiogroup" > click="removeFilter()" left="10" top="40"/> > > <mx:RadioButton id="radiobutton2" > label="Show "one"" selected="false" > groupName="radiogroup" > click="applyFilter()" left="88" top="40"/> > > <mx:TileList id="tilelist" > dataProvider="{ac}" > itemRenderer="{new ClassFactory( Label )}" left="10" > right="10" bottom="99" top="70"/> > > <mx:LinkButton id="linkbutton1" > label="Show Dummy State" > click="currentState='dummyState'" > left="10" top="10" /> > > <mx:TextArea x="10" y="259" width="400" height="81" > text="Steps to reproduce error:
1. Click > radiobutton labeled "Show one" to filter > ArrayCollection.
2. Click "Show Dummy State".
3. > Click "Show TileList State"." color="#000000" > fontWeight="bold" fontSize="10"/> > > </mx:Application> >