Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo
Status: FixReviewNeeded
Owner: [hidden email]

New issue 5229 by [hidden email]: Removing the global use of  
UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

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.

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.

First load inputEventSensorUserInterruptHandler.st, then the changeset.



Attachments:
        inputEventSensorUnregister.1.cs  3.3 KB
        inputEventSensorUserInterruptHandler.st  361 bytes


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo
Updates:
        Labels: Milestone-1.4

Comment #1 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo

Comment #2 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

So, using the new Event-Model, user interrupts can be customized by the  
client processing the system events,
no need to have a special user interrupt handler class.

The client would process a normal SystemKeyboardInputEvent, and do whatever  
it wants in case the keystroke was the current user-interrupt keystroke.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo

Comment #3 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

for example, in Gaucho :

GKeyboard>>keystroke: aGKeystroke
   ….
   aGKeystroke isUserInterrupt ifTrue:[ ^ self doUserInterrupt ].
  ...
               


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo

Comment #4 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

USE this changeset and workspace instead.

I fixed a typo in the Pre requisite script, and and bug in the changset.  
Now it works just fine.

Attachments:
        ISSUE5229.3.cs  2.7 KB
        ISSUE5229-Pre.txt  361 bytes


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo

Comment #5 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

Good!
I like that we make all these parts.




_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo

Comment #6 on issue 5229 by [hidden email]: Removing the global use of  
UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

Fernando, i don't like that you coupling sensor and interrupt handler.
They are both a clients of event fetcher, and there's nothing what implies  
that they should know about each other.

They should stay separated, because i can run image without sensor  
installed, but i might still like to have interrupt handler , so then i  
don't have UI, but i can press the interrupt key, and then in response to  
that it could start the UI/whatever.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo
Updates:
        Status: Workneeded

Comment #7 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

We will talk about that when fernando is visiting us.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo
Updates:
        Labels: -Milestone-1.4 Type-Cleanup

Comment #8 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

I have removed the 1.4 label.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 5229 in pharo: Removing the global use of UserInterruptHandler in favor of an inst var in the current Sensor

pharo
Updates:
        Status: Closed

Comment #9 on issue 5229 by [hidden email]: Removing the global use  
of UserInterruptHandler in favor of an inst var in the current Sensor
http://code.google.com/p/pharo/issues/detail?id=5229

Igor was right , as usual!
The current scheme can be cleaned, but my proposal was not the way to go.


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker