<br><br><div class="gmail_quote">On Sat, Dec 19, 2009 at 4:12 AM, Andreas Raab <span dir="ltr">&lt;<a href="mailto:andreas.raab@gmx.de" target="_blank">andreas.raab@gmx.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div>Eliot Miranda wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
    Interesting!  To my mind that definition is incorrect.  I would expect the sender of a block to be the sender of the enclosing method, in which case the definition would arguably be<br>
<br>
BlockClosure methods for accessing<br>
sender<br>
^self home sender<br>
<br>
A block activation&#39;s caller would be it&#39;s sender slot, so within a block you might refer to thisContext caller.  But what is arguably a bug in my implementation is that within a block activation thisContext sender refers to the caller (the sender of value: to the activation&#39;s block) not to the sender of the enclosing method.<br>


</blockquote>
<br></div>
How about instead of faking out BlockClosure&gt;&gt;sender we fix MessageTally along the lines of:<br>
<br>
MessageTally&gt;&gt;tallySendsTo:inBlock:showTree:<br>
<br>
  prev := aBlock asContextWithSender: thisContext.<br>
<br>
This should work just as well if I understand the intent of the change correctly.<br></blockquote><div><br></div><div>That&#39;s right.  In the Teleplace codebase we simply use asContext:</div><div><br></div><div>tallySendsTo: receiver inBlock: aBlock showTree: treeOption</div>

<div><span style="white-space:pre">        </span>...</div><div><span style="white-space:pre">        </span>thisContext sender</div><div><span style="white-space:pre">                </span>runSimulated: (prev := aBlock asContext)</div>
<div><span style="white-space:pre">                </span>contextAtEachStep:</div><div><span style="white-space:pre">                        </span>[:current |</div><span style="white-space:pre">                </span><span style="white-space:pre">        </span>...<div>
 </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Cheers,<br><font color="#888888">
  - Andreas<br>
<br>
<br>
</font></blockquote></div><br>