Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace qx.event.Manager.{set|get}GlobalEventMonitor with qx.event.Manager.{add|remove}GlobalEventListener #9616

cboulanger opened this issue Dec 23, 2018 · 0 comments


None yet
1 participant
Copy link

commented Dec 23, 2018

Since 32f6bc0, we have the ability to monitor all events that are dispatched centrally by setting a monitor function using qx.event.Manager.setGlobalEventMonitor. This is very useful, but it turns out that allowing only one monitor function is not optimal. Ideally, we want to register a number of monitor functions (i.e. listeners) from different parts of the code, which should not conflict with each other, and which should be individually removable, too.

So the API should be changed from a setter/getter pattern to an add/remove pattern, where the add() function returns an id with which the listener can later be removed, such as:

qx.event.Manager.addGlobalEventListener(fn {Function}, context {Object}) =>  {Integer}
qx.event.Manager.removeGlobalEventListener(id {Integer})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.