[Thank you Ranjan for replying to Andrew for me...]
On 2/28/2000, Ranjan Bagchi [ranjan_bagchi@yahoo.com] wrote: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "Proxies don't subclass UndefinedObject, they subclass nil, much like how Object subclasses nil." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I believe this is correct.
On 2/28/2000, Andrew P. Black [black@cse.ogi.edu] wrote: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "It does achieve one _undesired_ effect -- making all the Proxy objects print as nil!" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Although I do not have a ton of recent experience with proxies, I think that the proxy class implements #doesNotUnderstand: to get around these problems. What you do is you define a "realSubject" method that returns the class you are masking with your proxy. Any desirable protocol that the realSubject has that you want your proxy to have you can redirect to its realSubject. Of course, if the protocol is commonly used, you should probably avoid the #doesNotUnderstand: and instead implement the necessary protocol in the proxy.
hopefully that wasn't too confusing... :-)
---==> Chris
squeak-dev@lists.squeakfoundation.org