Topics

Issue with class overlay

Cyrille
 

Hello

 

I am developing an add-on to ease the use of Windows Magnifier with NVDA.

 

Since Ctrl+Alt+Arrows are table navigation commands, but also Magnifier commands, I would like to achieve the following behavior:

  • If the current cursor is in a  table, use normal table navigation
  • If the current cursor is not in a table, pass the gesture to the computer (gesture.send()) to move the magnified view

 

I have defined the following chooseNVDAObjectOverlayClasses function in my global plugin:

               

                def chooseNVDAObjectOverlayClasses(self, obj, clsList):

                               try:

                                               idx = clsList.index(DocumentWithTableNavigation)

                                               clsList.insert(idx,DocumentWithTableNavigationWithMag)

                               except ValueError:

                                               pass

 

And I have defined the class DocumentWithTableNavigationWithMag that inherit from DocumentWithTableNavigation to modify _tableMovementScriptHelper as well as previous/nextColumn/Row scripts.

 

However, the class is not overridden.

 

What could be wrong in my code? Any other idea?

 

Here is the repo of the code:

https://github.com/CyrilleB79

The branch where this code is is not master but testImprove

 

Thanks.

Cheers

 

Cyrille

 

Javi Domínguez
 

Hello.

Overlay occurs when the object receives focus but but A table within a document in a web view, for example, will not receive the focus because the navigation through the document is virtual.

Also, in my experience, overlay classes in global plugins gives problems.

I know very little about virtualBuffers, i can't help you with that. See the addon Easy Table Navigator by Joseph Lee. I think there you can learn how to find tables.

When you know if you are on a table or not you could do something like that:

    def script_movement(self, gesture):
        if inTable:
            scriptHandler.executeScript(documentBase.DocumentWithTableNavigation.script_nextColumn on documentBase.DocumentWithTableNavigation, gesture)        else:
            gesture.send()

Greetings

Javi Dominguez


El 04/12/2019 a las 0:32, Cyrille via Groups.Io escribió:

Hello

 

I am developing an add-on to ease the use of Windows Magnifier with NVDA.

 

Since Ctrl+Alt+Arrows are table navigation commands, but also Magnifier commands, I would like to achieve the following behavior:

  • If the current cursor is in a  table, use normal table navigation
  • If the current cursor is not in a table, pass the gesture to the computer (gesture.send()) to move the magnified view

 

I have defined the following chooseNVDAObjectOverlayClasses function in my global plugin:

               

                def chooseNVDAObjectOverlayClasses(self, obj, clsList):

                               try:

                                               idx = clsList.index(DocumentWithTableNavigation)

                                               clsList.insert(idx,DocumentWithTableNavigationWithMag)

                               except ValueError:

                                               pass

 

And I have defined the class DocumentWithTableNavigationWithMag that inherit from DocumentWithTableNavigation to modify _tableMovementScriptHelper as well as previous/nextColumn/Row scripts.

 

However, the class is not overridden.

 

What could be wrong in my code? Any other idea?

 

Here is the repo of the code:

https://github.com/CyrilleB79

The branch where this code is is not master but testImprove

 

Thanks.

Cheers

 

Cyrille