On Fri, Jul 10, 2009 at 3:04 PM, Maciej Stachowiak <span dir="ltr"><<a href="mailto:mjs@apple.com">mjs@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Robert's code is a bit buggy; canPlayType returns a string, not a boolean, so it will always appear to say yes.</blockquote><div> <br>You're being polite, my code was not "a bit buggy", it was completely broken.<br>
<br>I've actually made this mistake several times while writing tests recently, so I should have known better.<br><br>I actually anticipated this problem, and argued strenuously to break canPlayType into two boolean functions, "canPlayType" and "cannotPlayType", but I lost. Hopefully most Web authors are smarter than I am.<br>
</div></div><br clear="all">Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>