Re: [flexcoders] boolean not casting ok from string

2007-04-20 Thread Luis Eduardo
:* Re: [flexcoders] boolean not casting ok from string i see. So can i overload the = operator to it understand my needs? So i can do the converting transparently. btest:Boolean = false; i search on google and find it from a forum: overloading is still not supported in AS3

RE: [flexcoders] boolean not casting ok from string

2007-04-19 Thread Alex Harui
[mailto:[EMAIL PROTECTED] On Behalf Of Luis Eduardo Sent: Wednesday, April 18, 2007 9:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] boolean not casting ok from string yeah shaun, you are rigth. After follow your sugestion i searched in the docs and found what you mean here: http

Re: [flexcoders] boolean not casting ok from string

2007-04-19 Thread Luis Eduardo
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Luis Eduardo *Sent:* Wednesday, April 18, 2007 9:06 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] boolean not casting ok from string yeah shaun, you are rigth. After

RE: [flexcoders] boolean not casting ok from string

2007-04-19 Thread Gordon Smith
@yahoogroups.com Subject: Re: [flexcoders] boolean not casting ok from string Gordon and Iko and Hilary, thx for your assist but i am thinking i am not being very clear on my previous post. (perhaps my bad english ;) what i want to do is a typecast from the String true to the boolean value true

RE: [flexcoders] boolean not casting ok from string

2007-04-19 Thread Gordon Smith
PROTECTED] On Behalf Of Luis Eduardo Sent: Thursday, April 19, 2007 7:32 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] boolean not casting ok from string i see. So can i overload the = operator to it understand my needs? So i can do the converting transparently. btest:Boolean

[flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo
hi, this simple code dont work. var btest:Boolean = new Boolean(); btest = true; trace(btest = +btest); btest = false; trace(btest = : +btest); there are a compile warning telling me that: 3590: String used were a Boolean value was expected. The expression will be type coerced to Boolean

Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Hilary Bridel
try: var btest:Boolean; var testValue:String = true; btest = testValue == true ? true : false; trace(btest = +btest); Hilary -- On 4/19/07, Luis Eduardo [EMAIL PROTECTED] wrote: hi, this simple code dont work. var btest:Boolean = new Boolean();

RE: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Gordon Smith
Bridel Sent: Wednesday, April 18, 2007 5:18 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] boolean not casting ok from string try: var btest:Boolean; var testValue:String = true; btest = testValue == true ? true : false; trace(btest

RE: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Gordon Smith
; or var btest:Boolean; - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Luis Eduardo Sent: Wednesday, April 18, 2007 4:54 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] boolean not casting ok from string hi, this simple

Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Luis Eduardo *Sent:* Wednesday, April 18, 2007 4:54 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] boolean not casting ok from string hi, this simple code

Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Bjorn Schultheiss
Funny! On 19/04/2007, at 12:17 PM, Luis Eduardo wrote: but this not to Boolean: var numTest:Boolean = Boolean(false); trace(numtest = +numTest); var boolVal:String = false; var numTest:Boolean = boolVal == true; trace(numtest = +numTest); Bjorn

Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread shaun
Hi, Its not a bug. Note: the Constructor for Boolean in the docs. Think about it as if you have the following: var moo:String = Moo; if (moo) { // have a cow. }else{ //no cow. } So, Boolean(false) is true! var y; var x:Object; var b:Boolean = Boolean(false); trace(b1 false is

Re: [flexcoders] boolean not casting ok from string

2007-04-18 Thread Luis Eduardo
yeah shaun, you are rigth. After follow your sugestion i searched in the docs and found what you mean here: http://livedocs.adobe.com/flex/201/langref/package.html#Boolean() Boolean its a function that have the same behavior than the Boolean constructor that take a non-empty string and