[Pharo-project] Issue 5229: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor
Please integrate/review this one. In the context of replacing the current event handling mechanism, for the new Event-Model using announcements, i found out that the UserInterruptHandler is somehow treated as a global. See InputEventSensor>>installEventSensorFramework: fetcherClass. â¦. "Register the interrupt handler" UserInterruptHandler new registerIn: InputEventFetcher default. â¦â¦. What if you want to replace the user interrupt handler for another? It cant be done transparently. I've added the userInterruptHandler as an ivar of the current Sensor, so when it registers and unregisters, it takes care of registering and unregistering its user interrupt handler. So you can plug different user interrupt handlers to the current sensor. Fernando
err... you seems like crossing multiple layers by doing that. Because before you were able to have interrupt handler without having a sensor. Now you cannot have interrupt handler without having sensor installed. On 1 February 2012 14:14, Fernando Olivero <fernando.olivero@usi.ch> wrote:
Please integrate/review this one.
In the context of replacing the current event handling mechanism, for the new Event-Model using announcements, i found out that the UserInterruptHandler is somehow treated as a global.
See
 InputEventSensor>>installEventSensorFramework: fetcherClass.   â¦.   "Register the interrupt handler"   UserInterruptHandler new registerIn: InputEventFetcher default.   â¦â¦.
What if you want to replace the user interrupt handler for another? It cant be done transparently.
I've added the userInterruptHandler as an ivar of the current Sensor, so when it registers and unregisters, it takes care of registering and unregistering its user interrupt handler.
So you can plug different user interrupt handlers to the current sensor.
Fernando
-- Best regards, Igor Stasenko.
participants (2)
-
Fernando Olivero -
Igor Stasenko