Thank you Gordon. This was very helpful. Gets me what I need.
Thanks!
Don
--- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote:
Trace output appears in the Console pane. To see trace output, you need
to Debug rather than Run you app. If you trace an Array, each element of
Thanks! I'll try this option too.
Don
--- In flexcoders@yahoogroups.com, Muzak [EMAIL PROTECTED] wrote:
And you can use trace() in combination with
mx.utils.ObjectUtil.toString()
which will display the object tree structure in the console
trace(ObjectUtil.toString(myCanvas.getChildren()));
If your object is not typed, you can do this:
if (obj.getChildren)
{
obj.getChildren();
}
This will not work if the object is typed (1069 error). Also, if it has
a property by the name of getChildren, I think you'll get a 1006.
Otherwise, it seems to work just fine.
Shaun
--- In
Gordon's way does work -- and in fact it can be taken even further by
not only checking that there is a property called getChildren, but
also that that property is a function:
if (obj.hasOwnProperty(getChildren)
typeof obj[getChildren] == function)
{
children = obj.getChildren();
}
FWIW you can test for a property using in
if (getChildren in obj)
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Morearty
Sent: Tuesday, April 03, 2007 5:44 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: getChildren
5 matches
Mail list logo