[Flashcoders] casting string to bool

2006-03-03 Thread Latcho
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
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] casting string to bool

2006-03-03 Thread Jeremy Dost
You only need this---
var myBool:Boolean = ( myString == true);

If mixed case is a possibility then use myString.toLowerCase()

-jeremy

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Latcho
Sent: Friday, March 03, 2006 9:43 AM
To: Flashcoders mailing 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 build our own toBool Proto ?
thanks,
latcho
___
Flashcoders@chattyfig.figleaf.com
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/273 - Release Date: 3/2/2006




-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/273 - Release Date: 3/2/2006

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] casting string to bool

2006-03-03 Thread Danny Kodicek


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
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] casting string to bool

2006-03-03 Thread Karim Beyrouti
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 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
___
Flashcoders@chattyfig.figleaf.com
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


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.1.1/273 - Release Date: 02/03/2006


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] casting string to bool

2006-03-03 Thread Latcho

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 myBool:Boolean;
   myBool= ( myString == true) ? true : false;


You could cut out the last bit:

myBool= ( myString == true)
Danny
___
Flashcoders@chattyfig.figleaf.com
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



___
Flashcoders@chattyfig.figleaf.com
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