my understanding of it is as follows.

basically, its the same thing except when you are dealing with 
exceptions. if the cast doesnt work out, you get an exception (which u 
could handle in a try catch). if the 'as' doesnt work out, it returns 
a null (so u would use an if test to handle it. eg if(myObject == 
null)).

also you can only use the 'as' operator if your casting to a to Date 
or Array (....i think).

regrds 
bod


--- In flexcoders@yahoogroups.com, "polestar11" <[EMAIL PROTECTED]> wrote:
>
> Hi Jeremy
> 
> I have also had the problem in the past of the 'as X' expression
> returning null. To solve it you dont have to create a new
> ArrayCollection object, but only cast it as one:
> 
> >   countries = ArrayCollection(event.result.countries)
> 
> I dont know what the difference is between each:
> myData as ArrayCollection vs. ArrayCollection(myData)
> Does anyone out there know the difference?
> 
> Regards
> Tracy
>






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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to