Re: [Pharo-project] Custom user Interrupt handling
Michael, What's the approved method for unregistering the current user interrupt handler? InputEventFetcher default eventHandlers copy do: [:hndlr | (hndlr isKindOf: UserInterruptHandler) ifTrue: [ hndlr unregister]]. Looks like it would work, but seems a bit fragile. Dale ----- "Michael Rueger" <m.rueger@acm.org> wrote: | Dale Henrichs wrote: | | > The class UserInterruptHandler is tantalizingly close, however, | there | > is no obvious way to insinuate myself as an interested | party....It's | > pretty much hard-wired to open a debugger on the interrupted | > process.... | | Just write your own class (e.g. subclass UserInterruptHandler) and | replace the handler (unregister the current one and register your | own). | | That's why I designed it the way it is :-) | | michael
Dale Henrichs wrote:
Michael,
What's the approved method for unregistering the current user interrupt handler?
InputEventFetcher default eventHandlers copy do: [:hndlr | (hndlr isKindOf: UserInterruptHandler) ifTrue: [ hndlr unregister]].
Looks like it would work, but seems a bit fragile.
Hmm, well, that part obviously wasn't thought out well... So your code above would do for now. A better way could be to have the UserInterruptHandler class remember the current registered handler. Michael
mike can you add a bugtrack entry for 1.1 on that topic? On Aug 2, 2009, at 12:42 AM, Michael Rueger wrote:
Dale Henrichs wrote:
Michael,
What's the approved method for unregistering the current user interrupt handler?
InputEventFetcher default eventHandlers copy do: [:hndlr | (hndlr isKindOf: UserInterruptHandler) ifTrue: [ hndlr unregister]].
Looks like it would work, but seems a bit fragile.
Hmm, well, that part obviously wasn't thought out well... So your code above would do for now. A better way could be to have the UserInterruptHandler class remember the current registered handler.
Michael
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
participants (3)
-
Dale Henrichs -
Michael Rueger -
Stéphane Ducasse