[squeak-dev] Re: Gereric message catching proxy implementation Was: (Re: Detecting DNU sent by VM, not by code)

Klaus D. Witzel klaus.witzel at cobss.com
Mon Nov 24 23:51:41 UTC 2008


On Mon, 24 Nov 2008 23:21:37 +0100, Igor Stasenko wrote:

> Here the abstract implementation of proxy which could catch any
> messages

Nice catch knowing that VM continues lookup at the superclass if it found  
nil instead of a MethodDictionary ;)

> except those, which handled by VM directly, like #class.

-  
http://lists.squeakfoundation.org/pipermail/squeak-dev/2008-November/132520.html

> You can implement own proxy by subclassing
> MessageCatchingProxy
> and providing own implementation of
> #handleMessage:forProxy:
>
> I'm not sure, if it should be in 'Kernel-Methods'.
> I just thinking that it could be quite useful to people who need
> proxies or different message catching techniques, because it provides
> a really clean message catching comparing to any proxy which is
> subclass of ProtoObject or Object, because such kind of proxies can't
> cleanly intercept messages implemented in those classes without
> completely overriding them:
>
> ProtoObject methodDict size 35
> Object methodDict size 454
>




More information about the Squeak-dev mailing list