I've now seen this in a datagrid.  I swear I'd been through the UI
back and forth without this problem, and then I applied hotfix 1.  For
reasons particular to this project, I haven't applied hotfixes 2 and
3.  With hotfix 1, clicking on a datagrid made up of two columns, each
of which has a cell renderer, I get this null object reference error
deep in DataGrid.mouseDownHandler.

My solution was to override get data():Object in the renderer(s).

There was some discussion in the thread that the item renderer was
null; that was probably NOT the case.  In my case the item renderer
was not null, but the renderer.data WAS null, hence my overriding it.

I'll continue to play with it and report if I find anything.  I'm
hoping this isn't going to mess with all my datagrids.


> > > That is what I can't figure out. I don't know what I could do to
make
> > > it null. I'm trying to use the ideas from your sub-object
example, so
> > > I can pass in an object to the editor/renderer so it can then
validate
> > > the value and set a pass/fail validation value - Ex: I 'm passing in
> > > an object to businessRiskName where value="high" and
> > > passValidation=true. So I'm trying to use the sub-objects
> > > businessRiskName.value and businessRiskName.passValidation. I've
been
> > > able to get them to display properly, but when I click on the
datagrid
> > > I get the error I've described. I'm wondering if I'm not getting the
> > > data from the grid/provider correctly, but don't know where to look.
> > > 
> > > Any guidance would be greatly appreciated.
> > > 
> > > Thanks,
> > > 
> > > John
> > > --- In [email protected]
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > , "Alex Harui" <aharui@> wrote:
> > > >
> > > > How did itemEditorInstance get to be null?
> > > > 
> > > > 
> > > > 
> > > > ________________________________
> > > > 
> > > > From: [email protected]
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > [mailto:[email protected]
> > <mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com>
> > > ] On
> > > > Behalf Of j_lentzz
> > > > Sent: Wednesday, September 19, 2007 11:23 AM
> > > > To: [email protected]
<mailto:flexcoders%40yahoogroups.com>
> > <mailto:flexcoders%40yahoogroups.com> 
> > > > Subject: [flexcoders] Re: DataGrid editor/renderer
MouseDownHandler
> > > > error
> > > > 
> > > > 
> > > > 
> > > > For what it is worth, this is the error I get at runtime when I
> > click
> > > > on the cell:
> > > > 
> > > > TypeError: Error #1009: Cannot access a property or method of
a null
> > > > object reference.
> > > > at
> > > >
> > >
> >
mx.controls::DataGrid/mx.controls:DataGrid::mouseDownHandler()[E:\dev\fl
> > > > ex_201_borneo\sdk\frameworks\mx\controls\DataGrid.as:4239]
> > > > --- In [email protected]
> > <mailto:flexcoders%40yahoogroups.com> 
> > > <mailto:flexcoders%40yahoogroups.com>
> > > <mailto:flexcoders%40yahoogroups.com>
> > > > , "j_lentzz" <jelentz@> wrote:
> > > > >
> > > > > I've been working on getting a datagrid to validate and I am
> > close. 
> > > > > However, whenever I click on a cell in the datagrid, I get a
> > runtime
> > > > > error in the DataGrid.as file, because my itemEditorInstance is
> > > null.
> > > > > However, I am providing an extended TextInput to the datagrid
> > column
> > > > > the itemEditor and the itemRenderer. I've tried setting the
> > > > > rendererIsEditor to both true and false, but nothing
changes. Has
> > > > > anyone seen this? Or can tell me what I'm doing wrong? I'm
trying
> > to
> > > > > follow examples, but obviously I'm doing something wrong.
> > > > > 
> > > > > Thanks,
> > > > > John
> > > > >
> > > >
> > >
> >
>


Reply via email to