On Fri, Jul 10, 2009 at 3:04 PM, Maciej Stachowiak <span dir="ltr">&lt;<a href="mailto:mjs@apple.com">mjs@apple.com</a>&gt;</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&#39;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&#39;re being polite, my code was not &quot;a bit buggy&quot;, it was completely broken.<br>
<br>I&#39;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, &quot;canPlayType&quot; and &quot;cannotPlayType&quot;, but I lost. Hopefully most Web authors are smarter than I am.<br>
</div></div><br clear="all">Rob<br>-- <br>&quot;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.&quot; [Isaiah 53:5-6]<br>