It doesn't HAVE to be cast. It will execute fine without it, if the _expression_ is correct. But casting will enable the compiler to catch an incorrect _expression_ and also make it execute faster, because looking up properties and methods on a non-dynamic type is faster than looking them up on a dynamic one.

 

- Gordon

 


From: [email protected] [mailto:[email protected]] On Behalf Of Pascal Schrafl
Sent: Tuesday, October 24, 2006 2:15 PM
To: [email protected]
Subject: Re: [flexcoders] Accessing methods in nested components

 

Hello Gordon,

Thanks for the hint. I will try this. I didn't know, that the
parentDocument must be cast, because I use it also
(parentDocument.currentState='') and there it works. I will try it and
give you a feedback, if it solved my problem.

Best regards,

Pascal

Gordon Smith wrote:
>
> If you cast parentDocument to your application class, the compiler can
> tell you whether you've constructed the right _expression_ or not. For
> example, if your app is MyApp.mxml, then do
>
>
>
> MyApp(parentDocument).filenet...
>
>
>
> Without the cast, it can't typecheck anything because parentDocument
> is a generic Object on which you can access anything dynamically,
> including things that don't exist.
>
>
>
> - Gordon
>

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to