<div>Squeak complains that it doesn't know InputSensor.<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 class="protonmail_quote" type="cite"><div>-------- Original Message --------<br></div><div>Subject: Re: [Newbies] User Interrupt window<br></div><div>Local Time: December 9, 2017 10:06 AM<br></div><div>UTC Time: December 9, 2017 6:06 PM<br></div><div>From: ron@usmedrec.com<br></div><div>To: obrienj <obrienj@protonmail.com>, A friendly place to get answers to even the most basic questions about Squeak. <beginners@lists.squeakfoundation.org><br></div><div><br></div><div dir="ltr"><div>Hi OBrien J<br></div><div><br></div><div>One way to do this is to install a new interruptWatcher on Sensor.  <br></div><div><br></div><div>On the class you want to handle the message do something like<br></div><div><br></div><div>Sensor installInterruptWatcher:[self userInterruptWatcher].<br></div><div><br></div><div><div>Yourclass >> userInterruptWatcher<br></div><div><span style="white-space:pre"></span>"Wait for user interrupts and open a notifier on the active process when one occurs."<br></div><div><span style="white-space:pre"></span>| interruptSemaphore |<br></div><div><span style="white-space:pre"></span>interruptSemaphore := InputSensor interruptSemaphore.<br></div><div><span style="white-space:pre"></span>[true] whileTrue: [<br></div><div><span style="white-space:pre"></span>interruptSemaphore wait.<br></div><div><span style="white-space:pre"></span>self signal: #userInterrupt.<br></div><div><span style="white-space:pre"></span>].<br></div></div><div><br></div><div>Then implement your handler with something like onUserInterrupt to respond to the signal.  Or you could just call a method in your class to handle the interrupt.  <br></div><div><br></div><div>Hope that helps!<br></div><div><br></div><div>All the best,<br></div><div><br></div><div>Ron Teitelbaum <br></div><div><br></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><div>On Sat, Dec 9, 2017 at 12:09 PM, obrienj <span dir="ltr"><<a href="mailto:obrienj@protonmail.com">obrienj@protonmail.com</a>></span> wrote:<br></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex" class="gmail_quote"><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="m_-4939907134512455323protonmail_signature_block m_-4939907134512455323protonmail_signature_block-empty"><div class="m_-4939907134512455323protonmail_signature_block-user m_-4939907134512455323protonmail_signature_block-empty"><div><br></div></div><div class="m_-4939907134512455323protonmail_signature_block-proton m_-4939907134512455323protonmail_signature_block-empty"><br></div></div><div><br></div><div><br></div><div>______________________________<wbr>_________________<br></div><div> Beginners mailing list<br></div><div> <a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.<wbr>squeakfoundation.org</a><br></div><div> <a rel="noreferrer" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><br></div><div> <br></div></blockquote></div></div></div></blockquote><div><br></div>