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

Heads up: latest alpha generates error on editor gaining focus #12

Closed
zersiax opened this issue Feb 23, 2021 · 1 comment
Closed

Heads up: latest alpha generates error on editor gaining focus #12

zersiax opened this issue Feb 23, 2021 · 1 comment

Comments

@zersiax
Copy link

zersiax commented Feb 23, 2021

It seems this addon may need some slight updates to work with the upcoming 2021.1 version that is an addon API-breaking release.
Currently when landing in the editor, either by alt+tabbing in or accepting an autocomplete suggestion, the following error is thrown:

ERROR - eventHandler.executeEvent (20:58:34.947) - MainThread (30972):
error executing event: gainFocus on <NVDAObjects.Dynamic_EditableTextExCodeEditorEditableTextWithAutoSelectDetectionEditorIa2WebIAccessible object at 0x0708BED0> with extra args of {}
Traceback (most recent call last):
File "eventHandler.pyc", line 246, in executeEvent
File "eventHandler.pyc", line 96, in init
File "eventHandler.pyc", line 105, in next
File "C:\Users\flori\AppData\Roaming\nvda\addons\NVDAExtensionGlobalPlugin\globalPlugins\NVDAExtensionGlobalPlugin\theGlobalPlugin.py", line 664, in event_gainFocus
nextHandler()
File "eventHandler.pyc", line 105, in next
File "C:\Users\flori\AppData\Roaming\nvda\addons\remote\globalPlugins\remoteClient_init_.py", line 426, in event_gainFocus
nextHandler()
File "eventHandler.pyc", line 105, in next
File "C:\Users\flori\AppData\Roaming\nvda\addons\BrailleExtender\globalPlugins\brailleExtender_init_.py", line 186, in event_gainFocus
nextHandler()
File "eventHandler.pyc", line 105, in next
File "C:\Users\flori\AppData\Roaming\nvda\addons\nvda-for-vs-code\appModules\visualstudiocode.py", line 71, in event_gainFocus
self.processLine()
File "C:\Users\flori\AppData\Roaming\nvda\addons\nvda-for-vs-code\appModules\visualstudiocode.py", line 107, in processLine
reason=cTs.REASON_MESSAGE, suppressBlanks=True)
AttributeError: module 'controlTypes' has no attribute 'REASON_MESSAGE'

Likely has to do with this change:
nvaccess/nvda#11969

Please note that various other controlTypes calls have been slightly altered as well, see the current alpha's changelog.

@pawelurbanski
Copy link
Collaborator

I updated the constants. In addition to that, I have also cleaned the code in a few places.
What used to be a single Python file is now split into smaller modules. I will keep on working on this module as much as other projects will let me to do so.
Once I spend a day or 2 working using the current version, I will upload it to Github releaes page.
I generally tend to check compatibility and provide possible fixes in case any errors pop up once the next NVDA version is released. This is a side project, which I do want to spend my time on, for I use Visual Studio Code alot, but tend to focus on changes which result from confirmed changes in NVDA itself.

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

No branches or pull requests

2 participants