[squeak-dev] Catching user interrupts
Ralph Boland
rpboland at gmail.com
Thu May 20 22:10:59 UTC 2010
I would like to be able to catch a user interrupt or, if not possible,
some other user action like a key stroke or mouse action much like
one catches an Error. Ideally my code would look something like:
[some code] on: Interrupt do: [process Interrupt].
Of course there is no class Interrupt and even if there was
my guess is that user interrupts are handled at a low enough
level that the above code wouldn't work anyway.
For example, for the code:
[some code] on: Error do: [process Interrupt].
The user interrupt is generated while "some code" is running
so the "process Interrupt" code has no chance of running.
A simple question. I'm guessing the answer is not so simple
and perhaps not so safe.
I hope others find this question interesting.
Regards,
Ralph Boland
--
Quantum Theory cannot save us from the tyranny of a deterministic
universe but it does give God something to do
More information about the Squeak-dev
mailing list
|