anything other than 0 is false and i think Boolean's use strict equalities === 
so false is not the same as "false".toString()


----- Original Message ----
From: Marvin Froeder <[EMAIL PROTECTED]>
To: [email protected]
Sent: Monday, February 4, 2008 2:00:48 PM
Subject: [flexcoders] Strange behavior....

I'm making some test with Boolean Flex cast.


See:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe. com/2006/ mxml" layout="absolute"
    initialize="main()"
    >
    <mx:Script>
        <![CDATA[
            private function main():void {
                trace("Boolean: " + Boolean("true"));
                trace("Boolean: " + Boolean("false"));
            }
        ]]>
    </mx:Script>    
</mx:Application>


I expect true and false on console.

But I got:
[SWF] C:\framework\ workspace\ CobaiaFlex\ bin\BooleanTest. swf - 445.501 bytes 
after decompression
Boolean: true
Boolean: true


What happened?


Marvin




      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to