<br><br><div class="gmail_quote">On Tue, Feb 5, 2013 at 2:58 PM, Frank Shearar <span dir="ltr"><<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>></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 <<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>> wrote:<br>
><br>
><br>
> On Sat, Feb 2, 2013 at 2:36 PM, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On 31 January 2013 22:59, Frank Shearar <<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>> wrote:<br>
>> > On 30 January 2013 20:04, <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> wrote:<br>
>> >> Frank Shearar uploaded a new version of Kernel to project The Inbox:<br>
>> >> <a href="http://source.squeak.org/inbox/Kernel-fbs.736.mcz" target="_blank">http://source.squeak.org/inbox/Kernel-fbs.736.mcz</a><br>
>> >><br>
>> >> ==================== Summary ====================<br>
>> >><br>
>> >> Name: Kernel-fbs.736<br>
>> >> Author: fbs<br>
>> >> Time: 30 January 2013, 8:04:08.926 pm<br>
>> >> UUID: 1d99c937-4c68-475c-987b-2990c8040c29<br>
>> >> Ancestors: Kernel-fbs.735<br>
>> >><br>
>> >> Rename NotImplemented errors in line with conventions 2 of 3.<br>
>> >><br>
>> >> =============== Diff against Kernel-fbs.735 ===============<br>
>> ><br>
>> > If folks are happy with what I've got, I'd like to make one more<br>
>> > change, and remove NotYetImplemented>>#defaultAction. This will make<br>
>> > this message send open up a Debugger. Then I just need to tweak the<br>
>> > Debugger to show the Create button.<br>
>> ><br>
>> > If people think that's sensible I'll make the change and resubmit,<br>
>> > clearing out obsolete Inbox ancestors to show a more complete diff.<br>
>><br>
>> Actually, I'm going to hold off on touching NotYetImplemented. I think<br>
>> it's a good idea to remove the default action, but it and<br>
>> #shouldBeImplemented have a wrinkle that I can't see right now how to<br>
>> fix.<br>
>><br>
>> Let's say you have Bar >> #ff [ self notYetImplemented ]. You evaluate<br>
>> `Bar new ff` and the Debugger pops up, asking if you want to create<br>
>> that method. You enter the desired behaviour - `^ 1` - and accept. The<br>
>> stack now looks like this:<br>
>><br>
>> Bar >> #ff (containing `^ 1`)<br>
>> Bar >> #ff (containing `self notYetImplemented`)<br>
>> <the topmost frame of the rest of the stack><br>
>> <the rest of the stack, ending in a DoIt><br>
>><br>
>> The topmost context returns, and _retriggers_ the exception. Instead,<br>
>> we should _discard_ the `self notYetImplemented` stack frame and have<br>
>> the new implementation return its result to <the topmost frame of the<br>
>> rest of the stack>.<br>
>><br>
>> It's probably not even hard, but my brain's a big mushy.<br>
><br>
><br>
> currentContext privSender: currentContext sender sender<br>
> or<br>
> currentContext swapSender: currentContext sender sender<br>
<br>
</div></div>Yep yep: in Debugger >> implement:inClass:category: this looks to do the trick:<br>
<br>
<stuff><br>
"Snip out of the call stack the context that raised the debugger. -<br>
the #notYetImplemented send, for example."<br>
self selectedContext privSender: self selectedContext sender sender.<br>
self resetContext: self selectedContext.<br>
self debug.<br>
<br>
Thanks for the tip! (I've done enough stack hacking that I should have<br>
remembered this stuff. Sad times!)<br></blockquote><div><br></div><div>don'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>
>> So instead I'd like to merge what I have, and add as a separate<br>
>> enhancement<br>
>> * removing NotYetImplemented >> #defaultAction<br>
>> * returning to the sender sender context, <the topmost frame of the<br>
>> rest of the stack>.<br>
>><br>
>> This latter step should also avoid the problem of people not writing<br>
>> their stubs as `^ self subclassResponsibility`, which prevents<br>
>> seamlessly progressing with one's computation. (If you don't say `^`<br>
>> then your new result-returning implementation returns its result to<br>
>> the non-`^` stub/marker context, which returns self.)<br>
>><br>
>> I want the experience of implementing missing functionality to be<br>
>> almost like rewriting history - "we have always had this<br>
>> implementation of this message". (To be read in the same voice as "We<br>
>> have always been at war with Eurasia.")<br>
>><br>
>> frank<br>
>><br>
><br>
><br>
><br>
> --<br>
> best,<br>
> Eliot<br>
><br>
><br>
><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div>