<div>Tried that but Sensor doesn't know interruptSemaphore<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 12:35 PM<br></div><div>UTC Time: December 9, 2017 8:35 PM<br></div><div>From: ron@usmedrec.com<br></div><div>To: obrienj <obrienj@protonmail.com><br></div><div>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>You can use Sensor instead.<br></div><div><br></div><div>All the best,<br></div><div><br></div><div><div>Ron Teitelbaum<br></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><div>On Sat, Dec 9, 2017 at 2:56 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>Squeak complains that it doesn't know InputSensor.<br></div><div class="HOEnZb"><div class="h5"><div class="m_542292085015092464protonmail_signature_block m_542292085015092464protonmail_signature_block-empty"><div class="m_542292085015092464protonmail_signature_block-user m_542292085015092464protonmail_signature_block-empty"><div><br></div></div><div class="m_542292085015092464protonmail_signature_block-proton m_542292085015092464protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote type="cite" class="m_542292085015092464protonmail_quote"><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: <a href="mailto:ron@usmedrec.com">ron@usmedrec.com</a><br></div><div>To: obrienj <<a href="mailto:obrienj@protonmail.com">obrienj@protonmail.com</a>>, A friendly place to get answers to even the most basic questions about Squeak. <<a href="mailto:beginners@lists.squeakfoundation.org">beginners@lists.<wbr>squeakfoundation.org</a>><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-wrap"></span>"Wait for user interrupts and open a notifier on the active process when one occurs."<br></div><div><span style="white-space:pre-wrap"></span>| interruptSemaphore |<br></div><div><span style="white-space:pre-wrap"></span>interruptSemaphore := InputSensor interruptSemaphore.<br></div><div><span style="white-space:pre-wrap"></span>[true] whileTrue: [<br></div><div><span style="white-space:pre-wrap"></span>interruptSemaphore wait.<br></div><div><span style="white-space:pre-wrap"></span>self signal: #userInterrupt.<br></div><div><span style="white-space:pre-wrap"></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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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_542292085015092464m_-4939907134512455323protonmail_signature_block m_542292085015092464m_-4939907134512455323protonmail_signature_block-empty"><div class="m_542292085015092464m_-4939907134512455323protonmail_signature_block-user m_542292085015092464m_-4939907134512455323protonmail_signature_block-empty"><div><br></div></div><div class="m_542292085015092464m_-4939907134512455323protonmail_signature_block-proton m_542292085015092464m_-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.squeakfoundati<wbr>on.org</a><br></div><div><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" rel="noreferrer">http://lists.squeakfoundation.<wbr>org/mailman/listinfo/beginners</a><br></div><div><br></div></blockquote></div></div></div></blockquote><div><br></div></div></div></blockquote></div></div></div></div></blockquote><div><br></div>