[CCC] Object class comment
chrisn at Kronos.com
Tue Feb 29 16:20:31 UTC 2000
[Thank you Ranjan for replying to Andrew for me...]
On 2/28/2000, Ranjan Bagchi [ranjan_bagchi at 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 at 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
hopefully that wasn't too confusing... :-)
More information about the Squeak-dev