Thank you Steve! --- In [email protected], "Steve Cox" <[EMAIL PROTECTED]> wrote: > > If (dataProvider[i].hasOwnProperty("someValue") && > dataProvider[i].someValue != null) > { > > } > > HTH > Steve > > -----Original Message----- > From: [email protected] [mailto:[EMAIL PROTECTED] On > Behalf Of Nate Pearson > Sent: 17 February 2007 00:48 > To: [email protected] > Subject: [flexcoders] Re: Cannot access a property or method of a null > object reference > > Does anyone know? This would help me immensely. > > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> > ups.com, "napearson99" <napearson99@> wrote: > > > > What if the property.someValue does not exist? How do I check if the > > reference to dataprovider[i].someValue property is null? > > > > my dataprovider is an arraycollection and holds different objects. > > Some objects have .someValue property and some do not. When i try to > > step through it it doesn't like it when it expects a property but it > > is not there. > > > > "ReferenceError: Error #1069: Property Desc not found on > > DragDrop_inlineComponent1 and there is no default value." > > > > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> > ups.com, "Paul DeCoursey" <paul@> wrote: > > > > > > if (dataprovider[i].someValue == null){ > > > ... > > > } > > > > > > --- In [EMAIL PROTECTED] <mailto:flexcoders%40yahoogroups.com> > ups.com, "napearson99" <napearson99@> wrote: > > > > > > > > I often get this error and I "usually" know why. Does anyone > know how > > > > to check for a null reference? > > > > > > > > i.e. > > > > > > > > if (dataprovider[i].someValue is null){ > > > > dothis(); > > > > } > > > > > > > > Where dataprovider[i] does not have a someValue property. I bet > this > > > > is pretty simple and I just don't know the syntax. Thanks in > advance! > > > > > > > > > >

