if ("item" in objADGLD) Gordon Smith Adobe Flex SDK Team
From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of thomas parquier Sent: Thursday, November 12, 2009 5:10 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How to test if an object contains a certain property? objADGLD.hasOwnProperty('item') ? thomas parquier --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr<mailto:thomas.parqu...@web-attitude.fr> softphone : sip:webattit...@ekiga.net<mailto:sip%3awebattit...@ekiga.net> téléphone portable : +33601 822 056 2009/11/12 Nick Middleweek <n...@middleweek.co.uk<mailto:n...@middleweek.co.uk>> 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