Ah... in-browser pseudo-code follows for anybody who finds this thread in
future :)
Will of course NPE for null obj!
function isDynamic(obj) : Boolean {
var result : Boolean = false;
try {
obj["____probablyDoesntExist"] = "blue";
delete obj.____probablyDoesntExist;
result = true;
} catch() {}
return result;
}
-J
On Wed, May 7, 2008 at 4:24 PM, Gordon Smith <[EMAIL PROTECTED]> wrote:
> But calling describeType() is probably much slower than the try/catch
> approach.
>
>
>
> Gordon Smith
>
> Adobe Flex SDK Team
>
>
> ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Bjorn Schultheiss
> *Sent:* Tuesday, May 06, 2008 11:19 PM
> *To:* [email protected]
> *Subject:* [flexcoders] Re: isDynamic(obj) ?
>
>
>
> flash.utils.describeType() returns XML describing the object.
> The root node has an attribute "isDynamic"..
>
> --- In [email protected] <flexcoders%40yahoogroups.com>, "Josh
> McDonald" <[EMAIL PROTECTED]> wrote:
> >
> > Guys,
> >
> > Is there some easy way to tell if an object is dynamic without
> wrapping it
> > in a try-catch and just messing with it?
> >
> > Cheers,
> > -J
> >
> > --
> > "Therefore, send not to know For whom the bell tolls. It tolls for
> thee."
> >
> > :: Josh 'G-Funk' McDonald
> > :: 0437 221 380 :: [EMAIL PROTECTED]
> >
>
>
>
--
"Therefore, send not to know For whom the bell tolls. It tolls for thee."
:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]