<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 2:58 PM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@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">
<div class="HOEnZb"><div class="h5">On 4 February 2013 22:12, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; On Sat, Feb 2, 2013 at 2:36 PM, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 31 January 2013 22:59, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; On 30 January 2013 20:04,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; Frank Shearar uploaded a new version of Kernel to project The Inbox:<br>
&gt;&gt; &gt;&gt; <a href="http://source.squeak.org/inbox/Kernel-fbs.736.mcz" target="_blank">http://source.squeak.org/inbox/Kernel-fbs.736.mcz</a><br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; ==================== Summary ====================<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Name: Kernel-fbs.736<br>
&gt;&gt; &gt;&gt; Author: fbs<br>
&gt;&gt; &gt;&gt; Time: 30 January 2013, 8:04:08.926 pm<br>
&gt;&gt; &gt;&gt; UUID: 1d99c937-4c68-475c-987b-2990c8040c29<br>
&gt;&gt; &gt;&gt; Ancestors: Kernel-fbs.735<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; Rename NotImplemented errors in line with conventions 2 of 3.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; =============== Diff against Kernel-fbs.735 ===============<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If folks are happy with what I&#39;ve got, I&#39;d like to make one more<br>
&gt;&gt; &gt; change, and remove NotYetImplemented&gt;&gt;#defaultAction. This will make<br>
&gt;&gt; &gt; this message send open up a Debugger. Then I just need to tweak the<br>
&gt;&gt; &gt; Debugger to show the Create button.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; If people think that&#39;s sensible I&#39;ll make the change and resubmit,<br>
&gt;&gt; &gt; clearing out obsolete Inbox ancestors to show a more complete diff.<br>
&gt;&gt;<br>
&gt;&gt; Actually, I&#39;m going to hold off on touching NotYetImplemented. I think<br>
&gt;&gt; it&#39;s a good idea to remove the default action, but it and<br>
&gt;&gt; #shouldBeImplemented have a wrinkle that I can&#39;t see right now how to<br>
&gt;&gt; fix.<br>
&gt;&gt;<br>
&gt;&gt; Let&#39;s say you have Bar &gt;&gt; #ff [ self notYetImplemented ]. You evaluate<br>
&gt;&gt; `Bar new ff` and the Debugger pops up, asking if you want to create<br>
&gt;&gt; that method. You enter the desired behaviour - `^ 1` - and accept. The<br>
&gt;&gt; stack now looks like this:<br>
&gt;&gt;<br>
&gt;&gt; Bar &gt;&gt; #ff (containing `^ 1`)<br>
&gt;&gt; Bar &gt;&gt; #ff (containing `self notYetImplemented`)<br>
&gt;&gt; &lt;the topmost frame of the rest of the stack&gt;<br>
&gt;&gt; &lt;the rest of the stack, ending in a DoIt&gt;<br>
&gt;&gt;<br>
&gt;&gt; The topmost context returns, and _retriggers_ the exception. Instead,<br>
&gt;&gt; we should _discard_ the `self notYetImplemented` stack frame and have<br>
&gt;&gt; the new implementation return its result to &lt;the topmost frame of the<br>
&gt;&gt; rest of the stack&gt;.<br>
&gt;&gt;<br>
&gt;&gt; It&#39;s probably not even hard, but my brain&#39;s a big mushy.<br>
&gt;<br>
&gt;<br>
&gt;     currentContext privSender: currentContext sender sender<br>
&gt; or<br>
&gt;     currentContext swapSender: currentContext sender sender<br>
<br>
</div></div>Yep yep: in Debugger &gt;&gt; implement:inClass:category: this looks to do the trick:<br>
<br>
        &lt;stuff&gt;<br>
        &quot;Snip out of the call stack the context that raised the debugger. -<br>
the #notYetImplemented send, for example.&quot;<br>
        self selectedContext privSender: self selectedContext sender sender.<br>
        self resetContext: self selectedContext.<br>
        self debug.<br>
<br>
Thanks for the tip! (I&#39;ve done enough stack hacking that I should have<br>
remembered this stuff. Sad times!)<br></blockquote><div><br></div><div>don&#39;t be hard on yourself.  chops like these have to be used regularly.  and look, they came back!  :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
frank<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
&gt;&gt; So instead I&#39;d like to merge what I have, and add as a separate<br>
&gt;&gt; enhancement<br>
&gt;&gt; * removing NotYetImplemented &gt;&gt; #defaultAction<br>
&gt;&gt; * returning to the sender sender context, &lt;the topmost frame of the<br>
&gt;&gt; rest of the stack&gt;.<br>
&gt;&gt;<br>
&gt;&gt; This latter step should also avoid the problem of people not writing<br>
&gt;&gt; their stubs as `^ self subclassResponsibility`, which prevents<br>
&gt;&gt; seamlessly progressing with one&#39;s computation. (If you don&#39;t say `^`<br>
&gt;&gt; then your new result-returning implementation returns its result to<br>
&gt;&gt; the non-`^` stub/marker context, which returns self.)<br>
&gt;&gt;<br>
&gt;&gt; I want the experience of implementing missing functionality to be<br>
&gt;&gt; almost like rewriting history - &quot;we have always had this<br>
&gt;&gt; implementation of this message&quot;. (To be read in the same voice as &quot;We<br>
&gt;&gt; have always been at war with Eurasia.&quot;)<br>
&gt;&gt;<br>
&gt;&gt; frank<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; best,<br>
&gt; Eliot<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>