When using the "as" operator, you can check for null.

<quote>
Evaluates whether an expression specified by the first operand is a member of 
the data type specified by the second operand. If the 
first operand is a member of the data type, the result is the first operand. 
Otherwise, the result is the value null.
</quote>

regards,
Muzak

----- Original Message ----- 
From: "Daniel Thompson" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 21, 2007 9:05 PM
Subject: RE: [Flashcoders] Type Coercion Failed: Odd behavior.


>
>> You should always use the new "as" operator.
>
> I disagree. If you want the TypeError thrown, because you're going to catch
> it, then it can be handy. I use both methods of casting and I like the
> choice. (I do agree that I wish it were (LiquidObject)child instead of
> LiquidObject(child)... but I'm not going to stop using it because I don't
> like the syntax.)
>
> -DT 


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to