<div>Now Squeak complains that i<span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(85, 85, 85)"><span class="font" style="font-family:Arial, "Helvetica Neue", Helvetica, sans-serif"><span class="size" style="font-size:14px">nstallInterruptWatcher is an unknown selector. </span></span></span></span><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:48 PM<br></div><div>UTC Time: December 9, 2017 8:48 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><div>I see.  You are right.  It's an instance var but there is no accessor for it.  <br></div><div><br></div><div>You will need to add an accessor for it to override the emergency evaluator.  <br></div><div><br></div><div>EventSensor >> interruptSemaphore<br></div><div>    "return the interruptSemaphore. Used for overriding the emergency evaluator on MyClass"<br></div><div>    ^interruptSemaphore<br></div><div><br></div><div>Then it should work.<br></div></div><div><br></div><div>All the best,<br></div><div><br></div><div>Ron Teitelbaum<br></div><div class="gmail_extra"><div><br></div><div class="gmail_quote"><div>On Sat, Dec 9, 2017 at 3:38 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>Tried that but Sensor doesn't know interruptSemaphore<br></div><div class="m_4380380782915841861protonmail_signature_block m_4380380782915841861protonmail_signature_block-empty"><div class="m_4380380782915841861protonmail_signature_block-user m_4380380782915841861protonmail_signature_block-empty"><div><br></div></div><div class="m_4380380782915841861protonmail_signature_block-proton m_4380380782915841861protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote type="cite" class="m_4380380782915841861protonmail_quote"><span class=""><div>-------- Original Message --------<br></div><div>Subject: Re: [Newbies] User Interrupt window<br></div></span><span class=""><div>Local Time: December 9, 2017 12:35 PM<br></div><div>UTC Time: December 9, 2017 8:35 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>><br></div></span><div><div class="h5"><div>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>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 class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Squeak complains that it doesn't know InputSensor.<br></div><div class="m_4380380782915841861HOEnZb"><div class="m_4380380782915841861h5"><div class="m_4380380782915841861m_542292085015092464protonmail_signature_block m_4380380782915841861m_542292085015092464protonmail_signature_block-empty"><div class="m_4380380782915841861m_542292085015092464protonmail_signature_block-user m_4380380782915841861m_542292085015092464protonmail_signature_block-empty"><div><br></div></div><div class="m_4380380782915841861m_542292085015092464protonmail_signature_block-proton m_4380380782915841861m_542292085015092464protonmail_signature_block-empty"><br></div></div><div><br></div><blockquote class="m_4380380782915841861m_542292085015092464protonmail_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: <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.squeakfoundat<wbr>ion.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 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_4380380782915841861m_542292085015092464m_-4939907134512455323protonmail_signature_block m_4380380782915841861m_542292085015092464m_-4939907134512455323protonmail_signature_block-empty"><div class="m_4380380782915841861m_542292085015092464m_-4939907134512455323protonmail_signature_block-user m_4380380782915841861m_542292085015092464m_-4939907134512455323protonmail_signature_block-empty"><div><br></div></div><div class="m_4380380782915841861m_542292085015092464m_-4939907134512455323protonmail_signature_block-proton m_4380380782915841861m_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 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></div></div></blockquote></div></div></div></div></div></div></blockquote><div><br></div></blockquote></div></div></div></blockquote><div><br></div>