On a related note, I noticed this syntax in Flash help this morning:

var componentClass:Class = e.target.selectedItem.data as Class;
var styles:Object = componentClass["getStyleDefinition"].call(this);

On Tue, Jun 24, 2008 at 8:27 PM, Patrick Matte | BLITZ <
[EMAIL PROTECTED]> wrote:

> Ah ok, the reason it wasn't working was that I was casting ClassReference
> as Class instead of Object... Now this works.
>
> var ClassReference:Object = getDefinitionByName("Test") as Object;
> var bool:Boolean = ClassReference.parse("false"); //would return false;
>
>
> BLITZ | Patrick Matte - 310-551-0200 x214
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] On Behalf Of Wagner Amaral
> Sent: Tuesday, June 24, 2008 7:18 AM
> To: Flash Coders List
> Subject: Re: [Flashcoders] calling public static methods on Class using
> getDefinitionByName
>
> On Tue, Jun 24, 2008 at 6:14 AM, Kenneth Kawamoto <
> [EMAIL PROTECTED]>
> wrote:
>
> > trace(getDefinitionByName("Test").parse("false"));
> >
>
>
> Nice
> Then maybe this works too (no compiler available right now, so just
> guessing):
>
> var c:Class = getDefinitionByName("Test") as Class;
> (c as Object).parse("false");
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>



-- 
-jonathan howe :: 404.434.2321 :: 180 High St Apt 26 Portland, ME 04101
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to