Please recompile with -verbose-stacktraces and post the contents of the exception dialog.
invalidateList requests validateDisplayList call in the next frame update. ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of tonmmp Sent: Thursday, March 22, 2007 12:04 PM To: [email protected] Subject: [flexcoders] Re: RTE when using itemRenderers in DataGrid. Greetings, I'm having the same issue, but only when switching between other application, using Alt-Tab. I've tried the "mydatagrid.validateDisplayList();" but isn't that the same as doing "mydatagrid..invalidateList();" ? I really need some help. Thanks --- In [email protected] <mailto:flexcoders%40yahoogroups.com> , "michael_ramirez44" <[EMAIL PROTECTED]> wrote: > > I have been struggling with this issue for about 2 weeks. I was able > to reproduce it in a small example. I add and remove an itemRenderer > to a datagrid column at run-time. This only won't cause the RTE but I > also set the datagrids dataProvider again which causes the error. You > will need the Flash Player Debug version to actually see the error. > You can view the example application at > http://develop.gurufaction.com/flexbug/App.swf <http://develop.gurufaction.com/flexbug/App.swf> . I have also include > the source with this post. > > --- App.mxml --- > <?xml version="1.0"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " > creationComplete="initApp()"> > <mx:Script> > <![CDATA[ > import mx.collections.*; > > public var renderer:ClassFactory; > > public function initApp():void > { > loadData(10); > } > > public function loadData(rows:uint):void > { > var gridData:ArrayCollection = new ArrayCollection(); > for( var x:int = 0; x < rows; x++) > { > var vo:Object = new Object(); > vo.fname = "John" ; > vo.lname = "Doe"; > vo.job = "Programmer"; > gridData.addItem(vo); > } > > dg.dataProvider = gridData; > } > > public function withRenderer():void > { > renderer = new ClassFactory(LinkRenderer); > fname.itemRenderer = renderer; > loadData(50); > } > > public function withOutRenderer():void > { > fname.itemRenderer = null; > loadData(100); > } > ]]> > </mx:Script> > <mx:TextArea text="To reproduce bug click 'With Item Renderer' and > then scroll datagrid!" width="300"/> > <mx:HBox> > <mx:Button id="wBtn" click="withRenderer()" label="With Item > Renderer"/> > <mx:Button id="woBtn" click="withOutRenderer()" label="WithOut Item > Renderer"/> > </mx:HBox> > <mx:DataGrid id="dg" width="300" height="400"> > <mx:columns> > <mx:DataGridColumn id="fname" dataField="fname" > headerText="Firstname" /> > <mx:DataGridColumn id="lname" dataField="lname" > headerText="Lastname" /> > <mx:DataGridColumn id="job" dataField="job" headerText="Job > Description" /> > </mx:columns> > </mx:DataGrid> > </mx:Application> > > --- LinkRenderer.mxml -- > <?xml version="1.0" encoding="utf-8"?> > <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml <http://www.adobe.com/2006/mxml> " width="100%" > height="100%" horizontalAlign="left"> > <mx:Script> > <![CDATA[ > > ]]> > </mx:Script> > <mx:LinkButton id="linkBtn" label="John"/> > </mx:HBox> >

