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

</BODY>
</HTML>