...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.
Any ideas?
Best, Marcel Am 15.12.2017 09:22:52 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Hi Jim,
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:
interrupt: process label: string "ToolSet register: self; default: self" Project current spawnNewProcessIfThisIsUI: process. self inform: string.
Best, Marcel
Am 14.12.2017 17:30:06 schrieb obrienj obrienj@protonmail.com: Hi Marcel,
I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.
I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:
infiniteLoop
| x |
ToolSet register: MyToolSet.
ToolSet default: MyToolSet.
Transcript clear. x := 0.
[x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].
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:.
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?
Thanks,
Jim
-------- Original Message --------
Subject: Re: [Newbies] User Interrupt window
Local Time: December 9, 2017 9:54 AM
UTC Time: December 9, 2017 5:54 PM
From: marcel.taeumel@hpi.de
To: obrienj obrienj@protonmail.com, beginners@lists.squeakfoundation.org
Hi, there.
1) Subclass StandardToolSet.
2) There, implement #interrupt:label: as you want it.
3) Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".
Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.
The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.
Best,
Marcel
Am 09.12.2017 18:09:51 schrieb obrienj obrienj@protonmail.com:
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
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.
Okay, such process-switching code can be tricky. If you keep that suspended process around for a while the Transcript's semaphore will block other semaphore uses. So, try this:
interrupt: process label: string "ToolSet register: self; default: self"
Project current spawnNewProcessIfThisIsUI: process; addDeferredUIMessage: [self inform: string].
process terminate.
If you want to execute more code, better write it into the block sent via #addDeferredUIMessage:.
Best, Marce. Am 15.12.2017 09:29:10 schrieb Marcel Taeumel marcel.taeumel@hpi.de: ...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.
Any ideas?
Best, Marcel Am 15.12.2017 09:22:52 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Hi Jim,
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:
interrupt: process label: string "ToolSet register: self; default: self" Project current spawnNewProcessIfThisIsUI: process. self inform: string.
Best, Marcel
Am 14.12.2017 17:30:06 schrieb obrienj obrienj@protonmail.com: Hi Marcel,
I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.
I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:
infiniteLoop
| x |
ToolSet register: MyToolSet.
ToolSet default: MyToolSet.
Transcript clear. x := 0.
[x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].
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:.
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?
Thanks,
Jim
-------- Original Message --------
Subject: Re: [Newbies] User Interrupt window
Local Time: December 9, 2017 9:54 AM
UTC Time: December 9, 2017 5:54 PM
From: marcel.taeumel@hpi.de
To: obrienj obrienj@protonmail.com, beginners@lists.squeakfoundation.org
Hi, there.
1) Subclass StandardToolSet.
2) There, implement #interrupt:label: as you want it.
3) Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".
Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.
The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.
Best,
Marcel
Am 09.12.2017 18:09:51 schrieb obrienj obrienj@protonmail.com:
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
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.
Tried it but nothing changed.
Looking at Debugger's methods, it appears that typing the interrupt key opens a notifier (the User Interrupt window), which gives the user the option to abandon the interrupted process. Is there a way to add a method to a program so that typing the interrupt key simply abandons the running process without the notifier opening?
-------- Original Message -------- Subject: Re: [Newbies] User Interrupt window Local Time: December 15, 2017 12:45 AM UTC Time: December 15, 2017 8:45 AM From: marcel.taeumel@hpi.de To: obrienj obrienj@protonmail.com beginners@lists.squeakfoundation.org, hosihanh via Squeak-dev squeak-dev@lists.squeakfoundation.org
Okay, such process-switching code can be tricky. If you keep that suspended process around for a while the Transcript's semaphore will block other semaphore uses. So, try this:
interrupt: process label: string "ToolSet register: self; default: self"
Project current spawnNewProcessIfThisIsUI: process; addDeferredUIMessage: [self inform: string].
process terminate.
If you want to execute more code, better write it into the block sent via #addDeferredUIMessage:.
Best, Marce.
Am 15.12.2017 09:29:10 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
...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.
Any ideas?
Best, Marcel
Am 15.12.2017 09:22:52 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
Hi Jim,
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:
interrupt: process label: string "ToolSet register: self; default: self" Project current spawnNewProcessIfThisIsUI: process. self inform: string.
Best, Marcel
Am 14.12.2017 17:30:06 schrieb obrienj obrienj@protonmail.com:
Hi Marcel,
I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.
I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:
infiniteLoop | x | ToolSet register: MyToolSet. ToolSet default: MyToolSet. Transcript clear. x := 0. [x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].
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:.
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?
Thanks, Jim
-------- Original Message -------- Subject: Re: [Newbies] User Interrupt window Local Time: December 9, 2017 9:54 AM UTC Time: December 9, 2017 5:54 PM From: marcel.taeumel@hpi.de To: obrienj obrienj@protonmail.com, beginners@lists.squeakfoundation.org
Hi, there.
- Subclass StandardToolSet.
- There, implement #interrupt:label: as you want it.
- Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".
Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.
The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.
Best, Marcel
Am 09.12.2017 18:09:51 schrieb obrienj obrienj@protonmail.com:
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners 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.
Hi Marcel,
On Dec 15, 2017, at 12:29 AM, Marcel Taeumel marcel.taeumel@hpi.de wrote:
...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.
Any ideas?
Shouldn't the transcript use a mutex instead?
Best, Marcel
Am 15.12.2017 09:22:52 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
Hi Jim,
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:
interrupt: process label: string "ToolSet register: self; default: self" Project current spawnNewProcessIfThisIsUI: process. self inform: string.
Best, Marcel
Am 14.12.2017 17:30:06 schrieb obrienj obrienj@protonmail.com:
Hi Marcel,
I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.
I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:
infiniteLoop | x | ToolSet register: MyToolSet. ToolSet default: MyToolSet. Transcript clear. x := 0. [x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].
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:.
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?
Thanks, Jim
-------- Original Message -------- Subject: Re: [Newbies] User Interrupt window Local Time: December 9, 2017 9:54 AM UTC Time: December 9, 2017 5:54 PM From: marcel.taeumel@hpi.de To: obrienj obrienj@protonmail.com, beginners@lists.squeakfoundation.org
Hi, there.
- Subclass StandardToolSet.
- There, implement #interrupt:label: as you want it.
- Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".
Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.
The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.
Best, Marcel
Am 09.12.2017 18:09:51 schrieb obrienj obrienj@protonmail.com:
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners 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.
Hi Eliot,
yes, it should. Wouldn't this be the case for all "size 1"-semaphores?
Best, Marcel
________________________________ From: Squeak-dev squeak-dev-bounces@lists.squeakfoundation.org on behalf of Eliot Miranda eliot.miranda@gmail.com Sent: Friday, December 22, 2017 6:06 PM To: The general-purpose Squeak developers list Subject: Re: [squeak-dev] [Newbies] User Interrupt window
Hi Marcel,
On Dec 15, 2017, at 12:29 AM, Marcel Taeumel <marcel.taeumel@hpi.demailto:marcel.taeumel@hpi.de> wrote:
...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.
Any ideas?
Shouldn't the transcript use a mutex instead?
Best, Marcel
Am 15.12.2017 09:22:52 schrieb Marcel Taeumel <marcel.taeumel@hpi.demailto:marcel.taeumel@hpi.de>:
Hi Jim,
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:
interrupt: process label: string "ToolSet register: self; default: self" Project current spawnNewProcessIfThisIsUI: process. self inform: string.
Best, Marcel
Am 14.12.2017 17:30:06 schrieb obrienj <obrienj@protonmail.commailto:obrienj@protonmail.com>:
Hi Marcel,
I made MyToolSet, a subclass of StandardToolSet, and added a copy of #interrupt:label to it.
I next created HaltExperiment as an Object subclass and added this simple, infinite loop method:
infiniteLoop | x | ToolSet register: MyToolSet. ToolSet default: MyToolSet. Transcript clear. x := 0. [x >= 0] whileTrue: [x := x + 1. Transcript show: 'x = ', x; cr.].
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:.
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?
Thanks, Jim
-------- Original Message -------- Subject: Re: [Newbies] User Interrupt window Local Time: December 9, 2017 9:54 AM UTC Time: December 9, 2017 5:54 PM From: marcel.taeumel@hpi.demailto:marcel.taeumel@hpi.de To: obrienj <obrienj@protonmail.commailto:obrienj@protonmail.com>, beginners@lists.squeakfoundation.orgmailto:beginners@lists.squeakfoundation.org
Hi, there.
1) Subclass StandardToolSet. 2) There, implement #interrupt:label: as you want it. 3) Set your new tool set via "ToolSet register: MyToolSet" and "ToolSet default: MyToolSet".
Note that ToolSet is an AppRegistry and hence a wrapper whereas StandardToolSet is an actual tool set. :-) Other app registries include WebBrowser and SoundService.
The user interrupt is not implemented with exceptions but a watchdog process and a special semaphore. See EventSensor >> #userInterruptWatcher for more information.
Best, Marcel
Am 09.12.2017 18:09:51 schrieb obrienj <obrienj@protonmail.commailto:obrienj@protonmail.com>:
_______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.orgmailto:Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners 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.
squeak-dev@lists.squeakfoundation.org