Hi,

How are you constructing your Boolean object?
Are you doing something like:

   var b:Boolean("false");  //true.

when you want:

   var b:Boolean(false); //false.

Have a read of the docs for the Boolean constructor if this is how your 
creating your Booleans, that might clear things up.

[snip]

> My actual code is:
> 
> function filter(includeBase:Boolean) : void
> {
> if ( includeBase )
> {
> // Do a whole lot of stuff here.
> // Including updating bound variables, etc.
> }
> // After if do the rest of my merge process.
> }
> 
> My problem was that if I passed in true or false, it always went into
> the true block of the if statement. So that is when I created my test
> function of crazy. So let's forget about that test function
> (although, there were not dup names. One var is "s", the other is "ss").
> 
> So, my function has several things it will be doing inside of the true
> portion of the if statement, and then whether or not it was true or
> false, continue with other processes. After creating my "crazy" test
> function I then came back and modified my function to:
> function filter(includeBase:Boolean) : void
> {
> if ( includeBase )
> {
> // Do a whole lot of stuff here.
> // Including updating bound variables, etc.
> }
> else
> {
> // HACK FOR AN APPARENT BUG!
> // Not sure why, but this if statement will always resolve to
> true unless there is an else.
> var whoKnowsWhy : String;
> }
> // After if do the rest of my merge process.
> }
> 
> Once I did this, my code works great. includeBase of true and it will
> go into the true block. includeBase of false and it will go into the
> false block.

I find this very very hard to beleive. I'm betting you changed the way 
your exercising the code (ie) by passing in an explicit false or true to 
the function.

[snip]

HTH.
  - shaun

Reply via email to