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

Igor Stasenko siguctua at gmail.com
Mon Nov 24 22:21:37 UTC 2008


Here the abstract implementation of proxy which could catch any
messages except those, which handled by VM directly, like #class.

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

-- 
Best regards,
Igor Stasenko AKA sig.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MessageCatchingProxy.st
Type: application/octet-stream
Size: 1114 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20081125/de921503/MessageCatchingProxy.obj


More information about the Squeak-dev mailing list