<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [GOODIE] Delegation and Self like things for Squeak</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Many, many thanks Stephen. It is clearly an issue with my VMBuilder in 3.1 land. Time to re-evaluate those Plugins and see what is different. I haven't tried your VM yet, but will when I get home to my Linux box. </FONT></P>
<P><FONT SIZE=2>That is the Forwarder implementation if we set the target's receiverMap to the Forwarder. Identity maintained! For this other bit that I want, to remove the ProtoObject protocol and make it a minimal impact piece, see my response to Jecel (although you have heard it all before :). </FONT></P>
<P><FONT SIZE=2>cheers,</FONT>
<BR><FONT SIZE=2>Rob </FONT>
</P>
<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: Stephen Pair [<A HREF="mailto:spair@advantive.com">mailto:spair@advantive.com</A>]</FONT>
<BR><FONT SIZE=2>> Sent: Tuesday, August 21, 2001 5:49 PM</FONT>
<BR><FONT SIZE=2>> To: squeak-dev@lists.squeakfoundation.org</FONT>
<BR><FONT SIZE=2>> Subject: RE: [GOODIE] Delegation and Self like things for Squeak</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Rob,</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> I've compiled a Linux VM with RedHat 6.2, it seems to check </FONT>
<BR><FONT SIZE=2>> out OK. The</FONT>
<BR><FONT SIZE=2>> zip file now just contains an image and changes file. So, try getting</FONT>
<BR><FONT SIZE=2>> that and the linux VM and see if you have better luck. I've release</FONT>
<BR><FONT SIZE=2>> Rev.4 of the Delegation change set which fixes a couple of things and</FONT>
<BR><FONT SIZE=2>> cleans up a couple of other things.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> >I does start to seem like just an extended Proxy, with the ability to</FONT>
<BR><FONT SIZE=2>> install methods. This is very nice, but it may not be the </FONT>
<BR><FONT SIZE=2>> thing I think</FONT>
<BR><FONT SIZE=2>> I need. Having instance methods, or rather reference-scoped </FONT>
<BR><FONT SIZE=2>> methods, is</FONT>
<BR><FONT SIZE=2>> half of the solution. The other bit is a truly stateless, first-class</FONT>
<BR><FONT SIZE=2>> reference, that maintains identity, but allows for method override and</FONT>
<BR><FONT SIZE=2>> lookup notification.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >I believe it would depend on how we bring Forwarder/ManagedObjects</FONT>
<BR><FONT SIZE=2>> support using this mechanism. The forwardee would be a parental slot,</FONT>
<BR><FONT SIZE=2>> that would have it's protocol delegated too. How would we do pushSelf</FONT>
<BR><FONT SIZE=2>> substitution in this scheme? I imagine that the receiverSelf for the</FONT>
<BR><FONT SIZE=2>> forwardee would be the forwarder prototype.</FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >I understand about the storage overhead (receiverMap) - that </FONT>
<BR><FONT SIZE=2>> sucks. We</FONT>
<BR><FONT SIZE=2>> need a first class reference object, that the VM knows how to</FONT>
<BR><FONT SIZE=2>> manipulate. </FONT>
<BR><FONT SIZE=2>> ></FONT>
<BR><FONT SIZE=2>> >For my desire to have managed objects (managing message </FONT>
<BR><FONT SIZE=2>> sending), this</FONT>
<BR><FONT SIZE=2>> provides a mechanism to override methods at the instance level in the</FONT>
<BR><FONT SIZE=2>> proxy prototype. I would have to compile/install all methods </FONT>
<BR><FONT SIZE=2>> I want to</FONT>
<BR><FONT SIZE=2>> intercept, with the correct intercept code. So for my needs, I would</FONT>
<BR><FONT SIZE=2>> rather have a way to either:</FONT>
<BR><FONT SIZE=2>> > 1 - have a message lookup notification, with the ability to</FONT>
<BR><FONT SIZE=2>> either cancel further lookup, or choose not to resend</FONT>
<BR><FONT SIZE=2>> > 2 - have the ability to install custom lookup methods for an</FONT>
<BR><FONT SIZE=2>> instance, and have the VM check and activate custom lookup when a send</FONT>
<BR><FONT SIZE=2>> occurs.</FONT>
<BR><FONT SIZE=2>> >Another alternative is a notification whenever lookup is </FONT>
<BR><FONT SIZE=2>> changing it's</FONT>
<BR><FONT SIZE=2>> scope to a superclass or parent, as the case may be.</FONT>
<BR><FONT SIZE=2>> >- Rob</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Rob...Try this:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> - create a new prototype</FONT>
<BR><FONT SIZE=2>> - set it's superclass to ProtoObject (necessary to peacefully exist in</FONT>
<BR><FONT SIZE=2>> squeak)</FONT>
<BR><FONT SIZE=2>> - remove all slots except one, which is *not* a parent slot </FONT>
<BR><FONT SIZE=2>> (let's call</FONT>
<BR><FONT SIZE=2>> it "target")</FONT>
<BR><FONT SIZE=2>> - remove all methods</FONT>
<BR><FONT SIZE=2>> - add the following method:</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> -------</FONT>
<BR><FONT SIZE=2>> doesNotUnderstand: aMessage</FONT>
<BR><FONT SIZE=2>> "Do your stuff here"</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> ^target delegate: aMessage selector arguments: aMessage</FONT>
<BR><FONT SIZE=2>> arguments</FONT>
<BR><FONT SIZE=2>> -------</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Does this not give you the power to intercept all messages and do what</FONT>
<BR><FONT SIZE=2>> you need to do? In effect, this is an object with a completely</FONT>
<BR><FONT SIZE=2>> customized message response scheme (with the exception of the</FONT>
<BR><FONT SIZE=2>> ProtoObject methods...which could also be eliminated if a few </FONT>
<BR><FONT SIZE=2>> tweeks to</FONT>
<BR><FONT SIZE=2>> the base Squeak stuff). </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The reason we don't have target as a parent is because the VM would</FONT>
<BR><FONT SIZE=2>> attempt to go ahead and delegate the message before you had a </FONT>
<BR><FONT SIZE=2>> chance to</FONT>
<BR><FONT SIZE=2>> intercept it.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> - Stephen</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
</P>
</BODY>
</HTML>