how to cast a string true into a boolean true and a false into false
without using this long trick;
var myBool:Boolean;
myBool= ( myString == true) ? true : false;
by the way:
Boolean(true) = true
Boolean(false) = true
man this sucks
So build our own toBool Proto ?
thanks,
latcho
list
Subject: [Flashcoders] casting string to bool
how to cast a string true into a boolean true and a false into false
without using this long trick;
var myBool:Boolean;
myBool= ( myString == true) ? true : false;
by the way:
Boolean(true) = true
Boolean(false) = true
man this sucks
So
how to cast a string true into a boolean true and a false into false
without using this long trick;
var myBool:Boolean;
myBool= ( myString == true) ? true : false;
You could cut out the last bit:
myBool= ( myString == true)
Danny
___
Or ... Just to be sure:
myBool= ( myString.toLowerCase() == true)
- karim
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Danny
Kodicek
Sent: 03 March 2006 14:51
To: Flashcoders mailing list
Subject: Re: [Flashcoders] casting string to bool
how
Thanks!
that seems to be the triple right way ;)
but converting the type of a myString:String to a myString:Boolean is
just a big nono possible?
Latcho
Danny Kodicek wrote:
how to cast a string true into a boolean true and a false into
false without using this long trick;
var
5 matches
Mail list logo