For instance

parentApplication.appData['moduleParams'].table_name


'moduleParams' is an object as well. it might not exist, and
table_name might not exist... i need to test if table_name exists...

anything i put it returns

Error: Error #1009: Cannot access a property or method of a null
object reference.
        at...


i tried
if ((parentApplication.appData['moduleParams'] == null) ||
(!parentApplication.appData['moduleParams'].moduleFrom)) {
}

i tried

        if ((!parentApplication.appData.hasOwnProperty('moduleParams')) ||
(!parentApplication.appData.hasOwnProperty('moduleParams').moduleFrom)) {
}

or

        if ((!('moduleParams' in parentApplication.appData)) ||
(!('moduleFrom' in parentApplication.appData['moduleParams']))) {
}

same error...

anyone can help me how i would test if 

parentApplication.appData['moduleParams'].table_name
exists?


rafael




--- In [email protected], "Josh McDonald" <[EMAIL PROTECTED]> wrote:
>
> If it's an array, then you want:
> 
> if(archive[record_id].length > 1)
> {
>     //do stuff
> }
> 
> -Josh
> 
> On Tue, Jul 29, 2008 at 2:05 PM, Rafael Faria
> <[EMAIL PROTECTED]>wrote:
> 
> > Hello all,
> >
> > I'm here for one of my questions again :P
> >
> > I need to make a  comparison  like this
> >
> > if (archive[record_id][1].deleted_id == deleted_id) {
> >
> > }
> > My problem is that [1].deleted_id might not exist at this point.
> >
> > I know that archive[record_id] exists so how can i make this
> > comparison above?
> >
> > [1] might not exists and i can't use hasOwnProperty("1") because it
> > throws an error as well.
> >
> > can someone help me?! :P
> >
> > raf
> >
> >
> >
> > ------------------------------------
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
> > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > Links
> >
> >
> >
> >
> 
> 
> -- 
> "Therefore, send not to know For whom the bell tolls. It tolls for
thee."
> 
> :: Josh 'G-Funk' McDonald
> :: 0437 221 380 :: [EMAIL PROTECTED]
>


Reply via email to