Thanks.  I did see the documentation about the 'as' operator.  And
that is why it confused me that the Flex source code did that for the
Boolean. 

I have hacked around the issue for now, by automatically casting any
Boolean's to Numbers before I pass to the ObjectUtil.compare() method.
Luckily, in searching through the source code, it appears that this is
the only place in the public view of the code that ever tries convert
a Boolean to a Number via the 'as' operator.  I also assumed that I
would be able to trace the sorting calls on a data grid to this
method, but the debugger never stopped at all, (which explains why
using the default sorting on dataGrid does not show the issue).  I
think it normally just falls into some generic Array sort in that
case... *guess*.



--- In flexcoders@yahoogroups.com, "David Clark" <[EMAIL PROTECTED]> wrote:
>
> From the help for the as operator (search for operators):
> "Returns the first operand if it is a member of the data type
specified by
> the second operand."
>
> The important bit is "if it is a member".
>
> Number(a) will give you 1 and 0 though. I'm not sure if this is going to
> help you much for your specific problem with compare though. I would
almost
> say that it was a bug...
>
> --
> david
> "May the forces of evil become confused on the way to your house."
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to