<br><br><div class="gmail_quote">On Fri, Jul 17, 2009 at 2:31 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.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 style="word-wrap:break-word"><br><div><div><div></div><div class="h5"><div>On 17.07.2009, at 06:16, Eliot Miranda wrote:</div><br><blockquote type="cite"><br><br><div class="gmail_quote">On Thu, Jul 16, 2009 at 6:26 PM, 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"> Didn&#39;t we talk about this earlier?</blockquote><div><br></div><div>Yes we had discussed it, but I needed the reminder...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Process&gt;&gt;currentProcess<br>  &quot;Answer the currently active process.<br>  If the receiver is simulating another process,<br>
  answer the other process. If not, answer self.&quot;<br>  ^currentProcess ifNil:[self]<br> <br> Process&gt;&gt;currentProcess: aProcess<br>  &quot;Set the currently active process.<br>  Return the previous active process.&quot;<br>
  | prior |<br>  prior := currentProcess.<br>  currentProcess := aProcess.<br>  ^prior<br> <br> ProcessorScheduler&gt;&gt;activeProcess<br>  ^activeProcess currentProcess<br> <br> ProcessorScheduler&gt;&gt;currentProcess: aProcess<br>
  &quot;For debugging only.<br>   Pretend that aProcess is the activeProcess&quot;<br>  ^activeProcess currentProcess: aProcess<br> <br> and then:<br> <br> Debugger&gt;&gt;step<br>  prior := Processor currentProcess: interruptedProcess.<br>
  [self doStep] ensure:[Processor currentProcess: prior].<br> <br> etc.</blockquote><div><br></div><div>Yes.  This is OK, but it means the system codes to suit the debugger and that&#39;s always felt like the tail wagging the dog to me. </div>
<div><br></div><div>How about creating an anonymous subclass of the process that implements activeProcess</div></div></blockquote><div><br></div></div></div><div>#activeProcess is implemented by ProcessorScheduler not Process. So that won&#39;t work.</div>
</div></div></blockquote><div><br></div><div>Doh!  Thanks, Bert.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>
<div></div><div class="im"><blockquote type="cite"><div class="gmail_quote"><div>to raise an exception caught by the debugger that answers the right thing and class (to answer the proper class) and using adoptInstance: (the new guts of changeClassTo:)  for the duration of each step?</div>
 </div></blockquote></div></div><div><br></div><div>Sounds like a trade-off between magic and simplicity. </div></div></blockquote><div><br></div><div>:)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div></div><br><font color="#888888"><div> <span style="border-collapse:separate;border-spacing:0px 0px;color:rgb(0, 0, 0);font-family:Lucida Grande;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word">
<div style="font-family:Helvetica"><span style="font-family:Helvetica">- Bert -</span></div><br></div></span> </div><br></font></div><br><br>
<br></blockquote></div><br>