if ("item" in objADGLD)

Gordon Smith
Adobe Flex SDK Team

From: [email protected] [mailto:[email protected]] On Behalf 
Of thomas parquier
Sent: Thursday, November 12, 2009 5:10 AM
To: [email protected]
Subject: Re: [flexcoders] How to test if an object contains a certain property?



objADGLD.hasOwnProperty('item') ?

thomas parquier
---
http://www.web-attitude.fr/
msn : [email protected]<mailto:[email protected]>
softphone : sip:[email protected]<mailto:sip%[email protected]>
téléphone portable : +33601 822 056

2009/11/12 Nick Middleweek <[email protected]<mailto:[email protected]>>


Hello,

Does anyone know if it's possible to check if an object has a given property?

objADGLD is of type AdvancedDataGridListData which always contains a property 
called .item

Looking at the debugger, objADGLD.item's Declared Type can either be an Object 
or XML in different situations.

When it is an Object I want test if objADGLD.item.GroupLabel exists.

In JavaScript, I could've done this...

if ((objADGLD.item) && (objADGLD.item.GroupLabel))
{ // do something... }

... but it doesn't seem to be working for me in Flex.



Are there any good object inspection routines to help with this?


Thanks,
Nick


Reply via email to