accessifix / nvda-for-vs-code

NVDA add-on for Microsoft Visual Studio Code improving InteliSense, code completion support, and other accessibility features.
GNU General Public License v3.0
19 stars 10 forks source link

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

Closed zersiax closed 3 years ago

zersiax commented 3 years ago

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: https://github.com/nvaccess/nvda/issues/11969

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

pawelurbanski commented 3 years ago

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.