Try getQualifiedClassName/getQualifiedSuperClassName

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Josh McDonald
Sent: Monday, May 19, 2008 12:57 AM
To: [email protected]
Subject: [flexcoders] Determine "IS" with a Class object rather than an
instance?



Guys,

Say I have this:

function findMeAClassMagic() : Class { ... }

var foo : Class = findMeAClassMagic();

Can I determine whether or not the class represented by Foo is a Bar or
a subclass of Bar, without attempting to call a new foo() and hoping foo
has a zero-argument constructor inside a try-catch block? I'd rather not
risk any unwanted side-effects if possible, as I can't always know that
foo() won't do something unruly.

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] <mailto:[EMAIL PROTECTED]>  

 

Reply via email to