<br><br><div class="gmail_quote">On Wed, Mar 5, 2008 at 7:01 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello,<br>
<br>
i currently tried to implement a proxy (subclass of ProtoObject) with<br>
own IfTrue:/ifFalse: methods.<br>
What i can&#39;t understand, is why VM throws me with #mustBeBoolean<br>
message instead of doing real send if optimized pattern fails (when<br>
receiver of #IfTrue: is a non-boolean)?<br>
</blockquote></div><br><br>FYI, I have a vested interested in message capture, as does Craig Latta.<br><br>My approach is at <a href="http://www.squeaksource.com/DPON/MessageCapture-mvdg.13.mcz">http://www.squeaksource.com/DPON/MessageCapture-mvdg.13.mcz</a>. It includes special inspecters and print methods that let the debugger work (mostly) as well, although its still as dangerous as programming in C or playing with dynamite.<br clear="all">
<br>I can&#39;t remember if I also capture the ifTrue:/ifFalse sends; I may have overridden #mustBeBoolean to handle that case.<br><br>Craig Latta&#39;s approach was to make a special class using VM modifications. I think this is a better approach and I might rip his code off at some stage :-P.<br>
<br>Gulik.<br><br>-- <br><a href="http://people.squeakfoundation.org/person/mikevdg">http://people.squeakfoundation.org/person/mikevdg</a><br><a href="http://gulik.pbwiki.com/">http://gulik.pbwiki.com/</a>