<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        
                                        
                                            
                                        
                                        
                                        ...hmmm... this test seems to lock the Transcript's input semaphore. So, after CMD+Dot via MyToolSet, any calls to "Transcript show:" will freeze. Interesting.<div><br></div><div>Any ideas?</div><div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div>
                                        
                                        <blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 15.12.2017 09:22:52 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p><div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">
                                        Hi Jim,<div><br></div><div>well, the Debugger takes care of re-spawning a new UI process in case the interrupted one was the UI process. :-) You should do that, too:</div><div><br></div><div><div>interrupt: process label: string</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>"ToolSet register: self; default: self"</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>Project current spawnNewProcessIfThisIsUI: process.</div><div><span class="Apple-tab-span" style="white-space:pre">  </span>self inform: string.</div></div><div><br></div><div>Best,</div><div>Marcel</div><div><br></div><div><br></div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 14.12.2017 17:30:06 schrieb obrienj <obrienj@protonmail.com>:</p><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div>Hi Marcel,<br></div><div><br></div><div>I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.<br></div><div><br></div><div>I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:<br></div><div><br></div><div>infiniteLoop
<br></div><div>
| x |
<br></div><div>
ToolSet register:  MyToolSet.<br></div><div>ToolSet default:  MyToolSet.
<br></div><div>
Transcript clear. 

x := 0.<br></div><div>[x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].<br></div><div><br></div><div>As a test, I commented out the code in StandardToolSet’s #interrupt:label:, which stops the User Interrupt window from appearing but also causes Squeak to freeze after typing the interrupt key. Unfortunately, running HaltExperiment new infiniteLoop didn't restore the appearance of the User Interrupt window or stop Squeak from freezing even though MyToolSet has a complete copy of #interrupt:label:.<br></div><div><br></div><div>What am I doing wrong? How do I implement MyToolSet's #interrupt:label so that a dialog window appears with its own message to the user when infiniteLoop is interrupted?<br></div><div><br></div><div>Thanks,<br></div><div>Jim</div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><div><br></div></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote class="protonmail_quote" type="cite" style="min-width: 500px"><div>-------- Original Message --------<br></div><div>Subject: Re: [Newbies] User Interrupt window<br></div><div>Local Time: December 9, 2017 9:54 AM<br></div><div>UTC Time: December 9, 2017 5:54 PM<br></div><div>From: marcel.taeumel@hpi.de<br></div><div>To: obrienj <obrienj@protonmail.com>, beginners@lists.squeakfoundation.org<br></div><div><br></div><div style="font-size: 12pt;font-family: calibri;color: #000000"><div>Hi, there.<br></div><div><br></div><div>1) Subclass StandardToolSet.<br></div><div>2) There, implement #interrupt:label: as you want it.<br></div><div>3) Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".<br></div><div><br></div><div>Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.<br></div><div><br></div><div>The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.<br></div><div><br></div><div>Best,<br></div><div>Marcel<br></div><div class="mb_sig"><br></div><blockquote style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px" type="cite" class="history_container"><p style="margin-top: 10px;"><span class="colour" style="color:rgb(170, 170, 170)">Am 09.12.2017 18:09:51 schrieb obrienj <obrienj@protonmail.com>:</span><br></p><div>_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners <br></div><div>Is there a way to intercept the 'User Interrupt'  window that pops up when the user types the interrupt key and replace it with a customized dialog window? I've used on: do: to intercept Error messages but can't seem to do the same with EventSensor messages.<br></div><div class="protonmail_signature_block protonmail_signature_block-empty"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><div><br></div></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty"><br></div></div><div><br></div></blockquote></div></blockquote><div><br></div>
                        </blockquote>
                                        </div>
                        </blockquote></div>