Hi All,<div><br></div><div>    I&#39;ve completed porting MethodWrappers to Squeak 4.2.  You&#39;ll need to update your image to at least Compiler-eem.215 &amp; Kernel-eem.623.  You can find MethodWrappers4.2-eem.17 at <a href="http://www.squeaksource.com/MethodWrappers">http://www.squeaksource.com/MethodWrappers</a>.  Enjoy.</div>
<div><br></div><div>P.S.  Anyone in VW land interested in updating the codee?  The class comments in VW are obsolete (valueNowOrOnUnwindDo: is mentioned instead of ensure: etc).  If you do update the code you might want to add the tweak I did to MwBlockMethodWrapper&gt;valueWithReceiver:arguments: to make both before and after blocks optional. i.e.</div>
<div><br></div><div>MwBlockMethodWrapper methods for evaluating</div><div><div>valueWithReceiver: anObject arguments: anArrayOfObjects</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;Optionally evaluate beforeBlock before evaluating clientMethod if beforeBlock is non-nil.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span> Optionally evaluate afterBlock afterwards if afterBlock is non-nil.&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self wasActive: true.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>self beforeBlock ifNotNil:</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>[:beforeBlock| beforeBlock value: anObject value: anArrayOfObjects].</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>^self afterBlock</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ifNil: [self clientMethod valueWithReceiver: anObject arguments: anArrayOfObjects]</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>ifNotNil:</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>[:afterBlock|</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>[self clientMethod valueWithReceiver: anObject arguments: anArrayOfObjects]</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>ensure: [afterBlock value: anObject value: anArrayOfObjects]]</div><br><div class="gmail_quote">On Tue, Sep 13, 2011 at 2:42 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi All,<div><br></div><div>    the most up-to-date MethodWrappers I can find is for Squeak 3.9, pre-closures.  Anyone have anything compatible with Squeak 4.1/4.2/Pharo 1.1/1.2/1.3?<br clear="all">
<font color="#888888"><div><br></div>-- <br>best,<div>
Eliot</div><br>
</font></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>
</div>