You are seeing correct behavior.  See:
http://livedocs.adobe.com/flex/201/langref/package.html#Boolean()

If you want to do what your code intends to do you have to check for the
string "true" manually:

(variable == "true" ? true : false);

- Dan Freiman


On Feb 4, 2008 3:00 PM, Marvin Froeder <[EMAIL PROTECTED]> wrote:

>   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.501bytes 
> after decompression
> Boolean: true
> Boolean: true
>
>
> What happened?
>
>
> Marvin
>  
>

Reply via email to