etiennebalit / pyprocessing

Automatically exported from code.google.com/p/pyprocessing
2 stars 1 forks source link

extensibility #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Trying to register a custom pyglet event handler -> pyprocessing overwrites it.

What version of the product are you using? On what operating system?
pyprocessing-0.1.3.12 (irrelevant, but I use Ubuntu 11.11).

Please provide any additional information below.
I was trying to find a way to handle scrollwheel events, which I imagined was 
handled through on_mouse_press with buttons 4 & 5. It was not the case, pyglet 
generates the event on_mouse_scroll, which is not dealt with by pyprocessing 
(so actually no problem for me). But in conceptual terms, I believe 
pyprocessing should not make it hard to use pyglet directly. So my suggestion 
is to make 'run' either check if there is 'on_X_Y' handlers in __main__ and use 
them when registering canvas.window.event's or to accept the handlers as 
keyword arguments, and registering them after pyprocessing ones (possibly 
overwriting them). It will be the extension's responsibility to call 
pyprocessing handlers to not disrupt its functionality, if so desired/needed.

Just my 2c. :) Great work guys, very useful module!

Original issue reported on code.google.com by danielmb...@gmail.com on 22 Apr 2012 at 6:51

GoogleCodeExporter commented 9 years ago

Original comment by uo.strat...@gmail.com on 30 Aug 2012 at 3:00