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

Developer Guide: Missing description related to when events are defined in non-NVDAObjects when additional parameters exist for the event. #17266

Open
hwf1324 opened this issue Oct 9, 2024 · 0 comments

Comments

@hwf1324
Copy link
Contributor

hwf1324 commented Oct 9, 2024

Is your feature request related to a problem? Please describe.

The developer's guide description is problematic when defining events where additional parameters exist on non-NVDAObjects. For example:

code:

import globalPluginHandler
from NVDAObjects import NVDAObject


class GlobalPlugin(globalPluginHandler.GlobalPlugin):
	def event_mouseMove(self, obj: NVDAObject, nextHandler):
		nextHandler()

log:

WARNING - eventHandler._EventExecuter.next (14:23:30.746) - MainThread (19504):
Could not execute function event_mouseMove defined in globalPlugins.testMouseMove module; kwargs: {'x': 499, 'y': 531}
Traceback (most recent call last):
  File "eventHandler.pyc", line 128, in next
TypeError: GlobalPlugin.event_mouseMove() got an unexpected keyword argument 'x'

Describe the solution you'd like

Add a description of this situation to the documentation.

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant