<br><br><div class="gmail_quote">On Mon, Nov 24, 2008 at 2:08 PM, Igor Stasenko <span dir="ltr">&lt;<a href="mailto:siguctua@gmail.com">siguctua@gmail.com</a>&gt;</span> 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 list,<br>
is there any way to detect that DNU message was sent by VM , as result<br>
of failed method lookup, not intentionally by language side?<br>
<br>
I need to have a pseudo-class which intercepts _any_ message you<br>
sending to its instance, including #doesNotUnderstood: sent directly<br>
by language side.<br>
Of course, i can&#39;t do anything with messages which handled directly by<br>
VM , such as #class , but at least i want to make sure that rest of<br>
messages is intercepted with guarantee.<br>
<font color="#888888"></font></blockquote><div><br><br>Spoon has one of these; it involves VM modifications. Craig made a *special* class that the VM is aware of, which captures any message sent to it. I believe it&#39;ll capture every sent message.<br>
<br>Otherwise, it might be possible to kludge together a message catcher which uses various techniques to detect special messages sent to it. I remember doing something like that to catch &gt;&gt;ifTrue: and friends somehow using exceptions (I forget). You could probably detect #doesNotUnderstand: by determining whether the sender actually sent #doesNotUnderstand: explicitely somehow by looking at thisContext and tracing back to see what the sent selector was.<br>
<br>Gulik.<br></div></div><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>