Topics

Zoom Addon

Tim Harshbarger
 

Hi,

 

I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.

 

How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?

 

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

 

 

I'm curious as to how you would like to extend NVDA's functionality with Zoom? I use it often.





On 11/5/2019 11:36 AM, Tim Harshbarger via Groups.Io wrote:

Hi,

 

I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.

 

How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?

 

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

 

James Scholes
 

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you could consider:

try:
from appModules.zoom import AppModule
except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,
I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.
How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?
Thanks!
Tim
Tim Harshbarger
Senior Accessibility Consultant
Deque Systems

Ralf Kefferpuetz
 

That brings me to a similar question. If done as you proposed, what's the way to substitute or enhance a class withing
the zoom appmodule?

Regards,
Ralf

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of James Scholes
Sent: Dienstag, 5. November 2019 18:10
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you could consider:

try:
from appModules.zoom import AppModule
except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom
(virtual meeting client).  It appears that NVDA already has a Zoom module.

How would I import the Zoom module into my addon so I can extend the
functionality?  Or should I just overwrite the Zoom module with any
addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

Ralf Kefferpuetz
 

Hi Tim,

 

If you need beta testers for your zoom addon I’m more than willing to help out. I’m using Zoom all the day at work.

I would see at least 2 possible improvements based on my daily use.

  1. A hotkey do go directly to the presentation area, no matter where the focus is located. Would be helpful to read back the presentation with NVDA-R
  2. When moving the mouse over one of the participants sighted ppl see a menu popup where they can mute or unmute ppl as well as giving them presenter rights

 

Best regards,

  Ralf

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Tim Harshbarger via Groups.Io
Sent: Dienstag, 5. November 2019 17:36
To: nvda-addons@nvda-addons.groups.io
Subject: [nvda-addons] Zoom Addon

 

Hi,

 

I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.

 

How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?

 

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

 

Abdel
 

Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

This will import the AppModule class of the zoom module even if it is used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
   ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
   import appModuleHandler
   ZoomAppModule = appModuleHandler.AppModule

Then, in your code, you can extend the functionality of this appModule as follows:

class AppModule (ZoomAppModule):
    ...

Take a good look at what's already in the nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you could consider:

try:
 from appModules.zoom import AppModule
except ImportError:
 from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.

How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems


 

Hi,
You need to import everything from the Zoom app module and subclass whatever
class is in there (this is how add-on version of SearchUI app module works
in Windows 10 App Essentials).
Cheers,
Joseph

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io>
On Behalf Of Ralf Kefferpuetz
Sent: Tuesday, November 5, 2019 10:21 AM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

That brings me to a similar question. If done as you proposed, what's the
way to substitute or enhance a class withing the zoom appmodule?

Regards,
Ralf
-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io>
On Behalf Of James Scholes
Sent: Dienstag, 5. November 2019 18:10
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you could
consider:

try:
from appModules.zoom import AppModule
except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom
(virtual meeting client).  It appears that NVDA already has a Zoom module.

How would I import the Zoom module into my addon so I can extend the
functionality?  Or should I just overwrite the Zoom module with any
addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

James Scholes
 

On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it is used in another add-on.
But is that not what an add-on should be doing? If somebody already has a Zoom app module installed, an add-on shouldn't necessarily override it. I think there was an entire discussion about this, add-on precedence and such, but I don't recall ever seeing a resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,
@James:
You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule
This will import the AppModule class of the zoom module even if it is used in another add-on.
To be certain to extend the zoom appModule belonging to the nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
   ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
   import appModuleHandler
   ZoomAppModule = appModuleHandler.AppModule
Then, in your code, you can extend the functionality of this appModule as follows:

class AppModule (ZoomAppModule):
    ...
Take a good look at what's already in the nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources to see what you can add.
Kind regards,
Abdel.
Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you could consider:

try:
 from appModules.zoom import AppModule
except ImportError:
 from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client).  It appears that NVDA already has a Zoom module.

How would I import the Zoom module into my addon so I can extend the functionality?  Or should I just overwrite the Zoom module with any addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems



Noelia Ruiz
 

Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer.
Sorry if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail:
Cheers


Para: NVDA screen reader development <nvda-devel@...>
Re: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?
James Teh<jamie@...>
9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without copying
the app module, I'd avoid copying it, as this means you don't benefit
from future changes to the built-in module, etc. You can add extra stuff
by subclassing and overriding methods. For example:
from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

        # Perhaps you want to add a new overlay class
        def chooseNVDAObjectOverlayClasses(self, obj, clsList):
                super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList)
                # Do other stuff to clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...]
Sent: Wednesday, July 9, 2014 2:29 AM
To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?

Hi experts!
Can a same named appModule and already existed appModule in nvda package run
in parallel.
For example, there exists an appModule named explorer.py inside of
source/appModules folder. Now, if I want to add some more features
unavailable in the original explorer as a new addon explorer appModuled; can
both appModules with the same name as explorer.py on the addon and main nvda
run? I tried but the appModule existed at main nvda did not worked. Only
features of my addons be found.
Suggest me whether I lapse in coding or tried not possible approach.
I neither want any disturbance what is available in nvda nor want to copy
the code of nvda to my addon appModule. I just want to add additional
features via a new addons.
Is my idea workable?

----------------------------------------------------------------------------

2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it is
used in another add-on.
But is that not what an add-on should be doing? If somebody already has
a Zoom app module installed, an add-on shouldn't necessarily override
it. I think there was an entire discussion about this, add-on
precedence and such, but I don't recall ever seeing a resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
   ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
   import appModuleHandler
   ZoomAppModule = appModuleHandler.AppModule

Then, in your code, you can extend the functionality of this appModule
as follows:

class AppModule (ZoomAppModule):
    ...

Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you
could consider:

try:
 from appModules.zoom import AppModule
except ImportError:
 from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom
(virtual meeting client).  It appears that NVDA already has a Zoom
module.

How would I import the Zoom module into my addon so I can extend the
functionality?  Or should I just overwrite the Zoom module with any
addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems






Abdel
 

Hi Noelia,

You wrote :

so I think that Abdel approach is right, except that I wouldn't use try except statements for backwards compatibility, since nvdaBuiltin.appModules is available quite time ago.

If you read my answer, you will see that it is not for the nvdaBuiltin that I added the backward compatibility, but for the existence of the zoom appmodule.

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
    import appModuleHandler
    ZoomAppModule = appModuleHandler.AppModule
Thanks.

Kind regards,
Abdel.

Le 05/11/2019 à 22:24, Noelia Ruiz a écrit :
Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer.
Sorry if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail:
Cheers


Para: NVDA screen reader development <nvda-devel@...>
Re: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?
James Teh<jamie@...>
9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without copying
the app module, I'd avoid copying it, as this means you don't benefit
from future changes to the built-in module, etc. You can add extra stuff
by subclassing and overriding methods. For example:
from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

        # Perhaps you want to add a new overlay class
        def chooseNVDAObjectOverlayClasses(self, obj, clsList):
                super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList)
                # Do other stuff to clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...]
Sent: Wednesday, July 9, 2014 2:29 AM
To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?

Hi experts!
Can a same named appModule and already existed appModule in nvda package run
in parallel.
For example, there exists an appModule named explorer.py inside of
source/appModules folder. Now, if I want to add some more features
unavailable in the original explorer as a new addon explorer appModuled; can
both appModules with the same name as explorer.py on the addon and main nvda
run? I tried but the appModule existed at main nvda did not worked. Only
features of my addons be found.
Suggest me whether I lapse in coding or tried not possible approach.
I neither want any disturbance what is available in nvda nor want to copy
the code of nvda to my addon appModule. I just want to add additional
features via a new addons.
Is my idea workable?

----------------------------------------------------------------------------
2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it is
used in another add-on.
But is that not what an add-on should be doing? If somebody already has
a Zoom app module installed, an add-on shouldn't necessarily override
it. I think there was an entire discussion about this, add-on
precedence and such, but I don't recall ever seeing a resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule
This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
   ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
   import appModuleHandler
   ZoomAppModule = appModuleHandler.AppModule
Then, in your code, you can extend the functionality of this appModule
as follows:

class AppModule (ZoomAppModule):
    ...
Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you
could consider:

try:
 from appModules.zoom import AppModule
except ImportError:
 from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom
(virtual meeting client).  It appears that NVDA already has a Zoom
module.

How would I import the Zoom module into my addon so I can extend the
functionality?  Or should I just overwrite the Zoom module with any
addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems



Noelia Ruiz
 

Thanks. It was my mistake. Good day.

Enviado desde mi iPhone

El 6 nov 2019, a las 7:49, Abdel <abdelkrim.bensaid@...> escribió:

Hi Noelia,

You wrote :

so I think that Abdel approach is right, except that I wouldn't use try except statements for backwards compatibility, since nvdaBuiltin.appModules is available quite time ago.

If you read my answer, you will see that it is not for the nvdaBuiltin that I added the backward compatibility, but for the existence of the zoom appmodule.

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
import appModuleHandler
ZoomAppModule = appModuleHandler.AppModule
Thanks.

Kind regards,
Abdel.

Le 05/11/2019 à 22:24, Noelia Ruiz a écrit :
Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer.
Sorry if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail:
Cheers


Para: NVDA screen reader development <nvda-devel@...>
Re: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?
James Teh<jamie@...>
9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without copying
the app module, I'd avoid copying it, as this means you don't benefit
from future changes to the built-in module, etc. You can add extra stuff
by subclassing and overriding methods. For example:
from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

# Perhaps you want to add a new overlay class
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList)
# Do other stuff to clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...]
Sent: Wednesday, July 9, 2014 2:29 AM
To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already existed in
source/appModules folder run parallel?

Hi experts!
Can a same named appModule and already existed appModule in nvda package run
in parallel.
For example, there exists an appModule named explorer.py inside of
source/appModules folder. Now, if I want to add some more features
unavailable in the original explorer as a new addon explorer appModuled; can
both appModules with the same name as explorer.py on the addon and main nvda
run? I tried but the appModule existed at main nvda did not worked. Only
features of my addons be found.
Suggest me whether I lapse in coding or tried not possible approach.
I neither want any disturbance what is available in nvda nor want to copy
the code of nvda to my addon appModule. I just want to add additional
features via a new addons.
Is my idea workable?

----------------------------------------------------------------------------
2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it is
used in another add-on.
But is that not what an add-on should be doing? If somebody already has
a Zoom app module installed, an add-on shouldn't necessarily override
it. I think there was an entire discussion about this, add-on
precedence and such, but I don't recall ever seeing a resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule
This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
else:
import appModuleHandler
ZoomAppModule = appModuleHandler.AppModule
Then, in your code, you can extend the functionality of this appModule
as follows:

class AppModule (ZoomAppModule):
...
Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in, you
could consider:

try:
from appModules.zoom import AppModule
except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with Zoom
(virtual meeting client). It appears that NVDA already has a Zoom
module.

How would I import the Zoom module into my addon so I can extend the
functionality? Or should I just overwrite the Zoom module with any
addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems




James Scholes
 

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
except that I wouldn't use try except statements for backwards
compatibility, since nvdaBuiltin.appModules is available quite time
ago.
Sure, the namespace has been available for a long time. But not the Zoom app module, which is from 2018.

Regards,

James Scholes

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
Hi, I remembered that Jamie answered to a related question. I have searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since nvdaBuiltin.appModules is available quite time ago. Joseph replied too. To be short, I copy just the question and Jamie's answer. Sorry if I'm missing something here. I have a lot of
problems with Thunderbird at home and so I use Gmail: Cheers
Para: NVDA screen reader development <nvda-devel@...> Re: [Nvda-devel] Can samed named addon and a module already existed in source/appModules folder run parallel? James Teh<jamie@...> 9 de julio de 2014, 13:42 Unless you absolutely can't add the extra functionality without copying the app module, I'd avoid copying it, as this means you
don't benefit from future changes to the built-in module, etc. You
can add extra stuff by subclassing and overriding methods. For
example: from nvdaBuiltin.appModules import explorer
class AppModule(explorer.AppModule):
# Perhaps you want to add a new overlay class def chooseNVDAObjectOverlayClasses(self, obj, clsList): super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList) # Do other stuff to clsList here.
Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...] Sent: Wednesday, July 9, 2014 2:29 AM To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already existed in source/appModules folder run parallel?
Hi experts! Can a same named appModule and already existed appModule in nvda package run in parallel. For example, there exists an appModule named explorer.py inside of source/appModules folder. Now, if I want to add some more features unavailable in
the original explorer as a new addon explorer appModuled; can both appModules with the same name as explorer.py on the addon and main nvda run? I tried but the appModule existed at main nvda did not worked. Only features of my addons be found. Suggest me whether I lapse in coding or tried not possible approach. I neither want any disturbance what is available in nvda nor want to copy the code of nvda to my addon appModule. I just want to add additional features via a new addons. Is my idea workable?
----------------------------------------------------------------------------

2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it is used in another add-on.
But is that not what an add-on should be doing? If somebody already has a Zoom app module installed, an add-on shouldn't necessarily override it. I think there was an entire discussion about this, add-on precedence and such, but I don't recall ever seeing a resolution.
Regards,
James Scholes
On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,
@James:
You wrote :

Instead of importing AppModule from appModuleHandler, do:
from appModules.zoom import AppModule
This will import the AppModule class of the zoom module even if it is used in another add-on.
To be certain to extend the zoom appModule belonging to the nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule else:
import appModuleHandler ZoomAppModule = appModuleHandler.AppModule
Then, in your code, you can extend the functionality of this appModule as follows:

class AppModule (ZoomAppModule): ...
Take a good look at what's already in the nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources to see what you can add.
Kind regards, Abdel.
Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:
from appModules.zoom import AppModule
To protect against versions of NVDA without that module built in, you could consider:
try: from appModules.zoom import AppModule except ImportError:
from appModuleHandler import AppModule
Regards,
James Scholes
On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,
I am wanting to enhance some things in how NVDA interacts with Zoom (virtual meeting client). It appears that NVDA already has a Zoom module.
How would I import the Zoom module into my addon so I can extend the functionality? Or should I just overwrite the Zoom module with any addon I create?
Thanks!
Tim
Tim Harshbarger
Senior Accessibility Consultant
Deque Systems

Ralf Kefferpuetz
 

Basically this built-in addon speaks all events when in foreground or in the background.
#Explicetly allow alert events for zoom's chat windows.
#Zoom alerts are not zoom foreground window descendants.
eventHandler.requestEvents("alert",processId=self.processID,windowClassName="zoom_acc_notify_wnd")

Although it is a good idea it is extremely disturbing when in conference rooms with more then 20 people. I'm often in conferences with up to 80 people and you got flooded with announcements that people join or leaving the conference.
It would be great to have a on/off toggle for those announcements, or at least for the join/leaving alerts, so that messages in the chat window continues to be spoken.

Regards,
Ralf

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of James Scholes
Sent: Mittwoch, 6. November 2019 10:51
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
except that I wouldn't use try except statements for backwards
compatibility, since nvdaBuiltin.appModules is available quite time
ago.
Sure, the namespace has been available for a long time. But not the Zoom app module, which is from 2018.

Regards,

James Scholes

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer. Sorry
if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail: Cheers


Para: NVDA screen reader development
<nvda-devel@...> Re: [Nvda-devel] Can samed named
addon and a module already existed in source/appModules folder run
parallel? James Teh<jamie@...> 9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without
copying the app module, I'd avoid copying it, as this means you don't
benefit from future changes to the built-in module, etc. You can add
extra stuff by subclassing and overriding methods. For
example: from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

# Perhaps you want to add a new overlay class def
chooseNVDAObjectOverlayClasses(self, obj, clsList): super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList) # Do other stuff to
clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...] Sent:
Wednesday, July 9, 2014 2:29 AM To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already
existed in source/appModules folder run parallel?

Hi experts! Can a same named appModule and already existed appModule
in nvda package run in parallel. For example, there exists an
appModule named explorer.py inside of source/appModules folder. Now,
if I want to add some more features unavailable in the original
explorer as a new addon explorer appModuled; can both appModules with
the same name as explorer.py on the addon and main nvda run? I tried
but the appModule existed at main nvda did not worked. Only features
of my addons be found. Suggest me whether I lapse in coding or tried
not possible approach. I neither want any disturbance what is
available in nvda nor want to copy the code of nvda to my addon
appModule. I just want to add additional features via a new addons.
Is my idea workable?

---------------------------------------------------------------------
-------

2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it
is used in another add-on.
But is that not what an add-on should be doing? If somebody already
has a Zoom app module installed, an add-on shouldn't necessarily
override it. I think there was an entire discussion about this,
add-on precedence and such, but I don't recall ever seeing a
resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

This will import the AppModule class of the zoom module even if it
is used in another add-on.

To be certain to extend the zoom appModule belonging to the
nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule else:
import appModuleHandler ZoomAppModule = appModuleHandler.AppModule

Then, in your code, you can extend the functionality of this
appModule as follows:

class AppModule (ZoomAppModule): ...

Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA
sources to see what you can add.

Kind regards, Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in,
you could consider:

try: from appModules.zoom import AppModule except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with
Zoom (virtual meeting client). It appears that NVDA already has a
Zoom module.

How would I import the Zoom module into my addon so I can extend
the functionality? Or should I just overwrite the Zoom module
with any addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems







Robert Hänggi
 

It would also be great to have the chat history saved for later
inspection (e.g. links that were posted won't get lost).
I currently use the speechviewer to do that, along with Notepad++ and
regular expressions.
Robert

On 06/11/2019, Ralf Kefferpuetz <ralf.kefferpuetz@...> wrote:
Basically this built-in addon speaks all events when in foreground or in the
background.
#Explicetly allow alert events for zoom's chat windows.
#Zoom alerts are not zoom foreground window descendants.
eventHandler.requestEvents("alert",processId=self.processID,windowClassName="zoom_acc_notify_wnd")

Although it is a good idea it is extremely disturbing when in conference
rooms with more then 20 people. I'm often in conferences with up to 80
people and you got flooded with announcements that people join or leaving
the conference.
It would be great to have a on/off toggle for those announcements, or at
least for the join/leaving alerts, so that messages in the chat window
continues to be spoken.

Regards,
Ralf
-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io>
On Behalf Of James Scholes
Sent: Mittwoch, 6. November 2019 10:51
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
except that I wouldn't use try except statements for backwards
compatibility, since nvdaBuiltin.appModules is available quite time
ago.
Sure, the namespace has been available for a long time. But not the Zoom
app module, which is from 2018.

Regards,

James Scholes

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer. Sorry
if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail: Cheers


Para: NVDA screen reader development
<nvda-devel@...> Re: [Nvda-devel] Can samed named
addon and a module already existed in source/appModules folder run
parallel? James Teh<jamie@...> 9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without
copying the app module, I'd avoid copying it, as this means you don't
benefit from future changes to the built-in module, etc. You can add
extra stuff by subclassing and overriding methods. For
example: from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

# Perhaps you want to add a new overlay class def
chooseNVDAObjectOverlayClasses(self, obj, clsList): super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList) # Do other stuff to
clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...] Sent:
Wednesday, July 9, 2014 2:29 AM To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already
existed in source/appModules folder run parallel?

Hi experts! Can a same named appModule and already existed appModule
in nvda package run in parallel. For example, there exists an
appModule named explorer.py inside of source/appModules folder. Now,
if I want to add some more features unavailable in the original
explorer as a new addon explorer appModuled; can both appModules with
the same name as explorer.py on the addon and main nvda run? I tried
but the appModule existed at main nvda did not worked. Only features
of my addons be found. Suggest me whether I lapse in coding or tried
not possible approach. I neither want any disturbance what is
available in nvda nor want to copy the code of nvda to my addon
appModule. I just want to add additional features via a new addons.
Is my idea workable?

---------------------------------------------------------------------
-------

2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it
is used in another add-on.
But is that not what an add-on should be doing? If somebody already
has a Zoom app module installed, an add-on shouldn't necessarily
override it. I think there was an entire discussion about this,
add-on precedence and such, but I don't recall ever seeing a
resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

This will import the AppModule class of the zoom module even if it
is used in another add-on.

To be certain to extend the zoom appModule belonging to the
nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule else:
import appModuleHandler ZoomAppModule = appModuleHandler.AppModule

Then, in your code, you can extend the functionality of this
appModule as follows:

class AppModule (ZoomAppModule): ...

Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA
sources to see what you can add.

Kind regards, Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in,
you could consider:

try: from appModules.zoom import AppModule except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with
Zoom (virtual meeting client). It appears that NVDA already has a
Zoom module.

How would I import the Zoom module into my addon so I can extend
the functionality? Or should I just overwrite the Zoom module
with any addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems













Tim Harshbarger
 

One of the things I want to improve is how NVDA handles the live messages. I agree that I don't mind the announcement of people entering/leaving meetings and the chat messages when it is just a small meeting, but it can become quite distracting in large meetings. Hopefully, I'll figure it out and be able to share an addon. Most likely if I get to that point, I'll post it on Github.

Thanks,
Tim
Tim Harshbarger
Senior Accessibility Consultant
Deque Systems
Cell/Text: (309) 532-0193

-----Original Message-----
From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Robert Hänggi
Sent: Wednesday, November 6, 2019 5:42 AM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

It would also be great to have the chat history saved for later inspection (e.g. links that were posted won't get lost).
I currently use the speechviewer to do that, along with Notepad++ and regular expressions.
Robert

On 06/11/2019, Ralf Kefferpuetz <ralf.kefferpuetz@...> wrote:
Basically this built-in addon speaks all events when in foreground or
in the background.
#Explicetly allow alert events for zoom's chat windows.
#Zoom alerts are not zoom foreground window descendants.

eventHandler.requestEvents("alert",processId=self.processID,windowClas
sName="zoom_acc_notify_wnd")

Although it is a good idea it is extremely disturbing when in
conference rooms with more then 20 people. I'm often in conferences
with up to 80 people and you got flooded with announcements that
people join or leaving the conference.
It would be great to have a on/off toggle for those announcements, or
at least for the join/leaving alerts, so that messages in the chat
window continues to be spoken.

Regards,
Ralf
-----Original Message-----
From: nvda-addons@nvda-addons.groups.io
<nvda-addons@nvda-addons.groups.io>
On Behalf Of James Scholes
Sent: Mittwoch, 6. November 2019 10:51
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
except that I wouldn't use try except statements for backwards
compatibility, since nvdaBuiltin.appModules is available quite time
ago.
Sure, the namespace has been available for a long time. But not the
Zoom app module, which is from 2018.

Regards,

James Scholes

On 05/11/2019 at 9:24 pm, Noelia Ruiz wrote:
Hi, I remembered that Jamie answered to a related question. I have
searched for this in Gmail messages and this was sent to the mailing
list in 2014, so I think that Abdel approach is right, except that I
wouldn't use try except statements for backwards compatibility, since
nvdaBuiltin.appModules is available quite time ago. Joseph replied
too. To be short, I copy just the question and Jamie's answer. Sorry
if I'm missing something here. I have a lot of problems with
Thunderbird at home and so I use Gmail: Cheers


Para: NVDA screen reader development
<nvda-devel@...> Re: [Nvda-devel] Can samed named
addon and a module already existed in source/appModules folder run
parallel? James Teh<jamie@...> 9 de julio de 2014, 13:42
Unless you absolutely can't add the extra functionality without
copying the app module, I'd avoid copying it, as this means you don't
benefit from future changes to the built-in module, etc. You can add
extra stuff by subclassing and overriding methods. For
example: from nvdaBuiltin.appModules import explorer

class AppModule(explorer.AppModule):

# Perhaps you want to add a new overlay class def
chooseNVDAObjectOverlayClasses(self, obj, clsList): super(AppModule,
self).chooseNVDAObjectOverlayClasses(obj, clsList) # Do other stuff
to clsList here.

Jamie

From: Him Prasad Gautam [mailto:drishtibachak@...] Sent:
Wednesday, July 9, 2014 2:29 AM To: NVDA screen reader development
Subject: [Nvda-devel] Can samed named addon and a module already
existed in source/appModules folder run parallel?

Hi experts! Can a same named appModule and already existed appModule
in nvda package run in parallel. For example, there exists an
appModule named explorer.py inside of source/appModules folder. Now,
if I want to add some more features unavailable in the original
explorer as a new addon explorer appModuled; can both appModules
with the same name as explorer.py on the addon and main nvda run? I
tried but the appModule existed at main nvda did not worked. Only
features of my addons be found. Suggest me whether I lapse in coding
or tried not possible approach. I neither want any disturbance what
is available in nvda nor want to copy the code of nvda to my addon
appModule. I just want to add additional features via a new addons.
Is my idea workable?

--------------------------------------------------------------------
-
-------

2019-11-05 20:38 GMT+01:00, James Scholes <james@...>:
On 05/11/2019 at 6:36 pm, Abdel wrote:
This will import the AppModule class of the zoom module even if it
is used in another add-on.
But is that not what an add-on should be doing? If somebody already
has a Zoom app module installed, an add-on shouldn't necessarily
override it. I think there was an entire discussion about this,
add-on precedence and such, but I don't recall ever seeing a
resolution.

Regards,

James Scholes

On 05/11/2019 at 6:36 pm, Abdel wrote:
Hi James, Tim and all,

@James:

You wrote :

Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

This will import the AppModule class of the zoom module even if it
is used in another add-on.

To be certain to extend the zoom appModule belonging to the
nvdaBuiltin, it is better to use the following approach:

import nvdaBuiltin if hasattr (nvdaBuiltin.appModules, "zoom"):
ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule else:
import appModuleHandler ZoomAppModule = appModuleHandler.AppModule

Then, in your code, you can extend the functionality of this
appModule as follows:

class AppModule (ZoomAppModule): ...

Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA
sources to see what you can add.

Kind regards, Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
Instead of importing AppModule from appModuleHandler, do:

from appModules.zoom import AppModule

To protect against versions of NVDA without that module built in,
you could consider:

try: from appModules.zoom import AppModule except ImportError:
from appModuleHandler import AppModule

Regards,

James Scholes

On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
Hi,

I am wanting to enhance some things in how NVDA interacts with
Zoom (virtual meeting client). It appears that NVDA already has
a Zoom module.

How would I import the Zoom module into my addon so I can extend
the functionality? Or should I just overwrite the Zoom module
with any addon I create?

Thanks!

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems













derek riemer
 

Be careful doing this check. If the zoom module isn't present, and you create the AppModule based on appModuleHandler.AppModule, you can no longer assume that anything in the zoom appModule still exists. This is dangerous, because if you make assumptions about the built-in module doing things, you now have to check that you actually are using the real built-in module. I'd recommend not doing this check, and simply marking your addon incompatible with NVDA prior to 2018.3.

On Tue, Nov 5, 2019 at 11:36 AM Abdel <abdelkrim.bensaid@...> wrote:
Hi James, Tim and all,

@James:

You wrote :

> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule


This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

> import nvdaBuiltin
> if hasattr (nvdaBuiltin.appModules, "zoom"):
>    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
> else:
>    import appModuleHandler
>    ZoomAppModule = appModuleHandler.AppModule


Then, in your code, you can extend the functionality of this appModule
as follows:

> class AppModule (ZoomAppModule):
>     ...


Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule
>
> To protect against versions of NVDA without that module built in, you
> could consider:
>
> try:
>  from appModules.zoom import AppModule
> except ImportError:
>  from appModuleHandler import AppModule
>
> Regards,
>
> James Scholes
>
> On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
>> Hi,
>>
>> I am wanting to enhance some things in how NVDA interacts with Zoom
>> (virtual meeting client).  It appears that NVDA already has a Zoom
>> module.
>>
>> How would I import the Zoom module into my addon so I can extend the
>> functionality?  Or should I just overwrite the Zoom module with any
>> addon I create?
>>
>> Thanks!
>>
>> Tim
>>
>> Tim Harshbarger
>>
>> Senior Accessibility Consultant
>>
>> Deque Systems
>>
>>
>
>
>
>





--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com




Abdel
 

Hi Derek,

You wrote :

If the zoom module isn't present, and you create the AppModule based on appModuleHandler.AppModule, you can no longer assume that anything in the zoom appModule still exists. This is dangerous, because if you make assumptions about the built-in module doing things, you now have to check that you actually are using the real built-in module.


You're right, I see you're the creator of the zoom appModule.

We can distinguish these 2 cases by using a global variable as follows:

zoomIsPresent = False
import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
    zoomIsPresent = True
else:
    import appModuleHandler
    ZoomAppModule = appModuleHandler.AppModule


# Then, in the extended class :

class AppModule (ZoomAppModule):

    if zoomIsPresent:
        # We're extending the zoom appModule...
    else:
        # We're extending the appModuleHandler.AppModule...


I know, global variables are not recommended ...

However, the following problem may arise whether the check is done or not.

Since the zoom appModule has only one call to eventHandler.requestEvent in its constructor, in the subclass, it will be necessary to overwrite the constructor of the base class if we prefer that the alerts of people who connect and disconnect are configurable as Ralf had asked.

In this case, if we have to overwrite the base constructor, it wille be better to ignore the builtin appModule and create a new class inheriting from appModuleHandler.AppModule and place our logic for configuring alerts.

What are your thoughts?

Here is the base class of the builtin appModule of zoom:

#appModules/zoom.py:
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2018 NV Access Limited,Derek Riemer
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

import appModuleHandler
import eventHandler

class AppModule(appModuleHandler.AppModule):
    def __init__(self,*args,**kwargs):
        super(AppModule,self).__init__(*args,**kwargs)
        #Explicetly allow alert events for zoom's chat windows.
        #Zoom alerts are not  zoom foreground window descendants.
        eventHandler.requestEvents("alert",processId=self.processID,windowClassName="zoom_acc_notify_wnd")


Thanks.

Kind regards,
Abdel.
Le 10/11/2019 à 08:51, derek riemer a écrit :

Be careful doing this check. If the zoom module isn't present, and you create the AppModule based on appModuleHandler.AppModule, you can no longer assume that anything in the zoom appModule still exists. This is dangerous, because if you make assumptions about the built-in module doing things, you now have to check that you actually are using the real built-in module. I'd recommend not doing this check, and simply marking your addon incompatible with NVDA prior to 2018.3.

On Tue, Nov 5, 2019 at 11:36 AM Abdel <abdelkrim.bensaid@...> wrote:
Hi James, Tim and all,

@James:

You wrote :

> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule


This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

> import nvdaBuiltin
> if hasattr (nvdaBuiltin.appModules, "zoom"):
>    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
> else:
>    import appModuleHandler
>    ZoomAppModule = appModuleHandler.AppModule


Then, in your code, you can extend the functionality of this appModule
as follows:

> class AppModule (ZoomAppModule):
>     ...


Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule
>
> To protect against versions of NVDA without that module built in, you
> could consider:
>
> try:
>  from appModules.zoom import AppModule
> except ImportError:
>  from appModuleHandler import AppModule
>
> Regards,
>
> James Scholes
>
> On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
>> Hi,
>>
>> I am wanting to enhance some things in how NVDA interacts with Zoom
>> (virtual meeting client).  It appears that NVDA already has a Zoom
>> module.
>>
>> How would I import the Zoom module into my addon so I can extend the
>> functionality?  Or should I just overwrite the Zoom module with any
>> addon I create?
>>
>> Thanks!
>>
>> Tim
>>
>> Tim Harshbarger
>>
>> Senior Accessibility Consultant
>>
>> Deque Systems
>>
>>
>
>
>
>





--
Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠮ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠁ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com




Tim Harshbarger
 

In this situation, it is probably better that I just subclass the zoomModule or the appModule and not rely on conditional statements to build my subclass based on whatever might be available at the time.  I am sure Python includes enough class introspection features that I could determine which class had been subclassed (or use the global variable approach proposed) but this is probably one of those situations where it might be better to keep it simple and let the code fail spectacularly if the parent class doesn’t exist. 

 

Thanks for all the answers and thoughts on this!

 

Tim

Tim Harshbarger

Senior Accessibility Consultant

Deque Systems

From: nvda-addons@nvda-addons.groups.io <nvda-addons@nvda-addons.groups.io> On Behalf Of Abdel
Sent: Wednesday, November 13, 2019 2:30 AM
To: nvda-addons@nvda-addons.groups.io
Subject: Re: [nvda-addons] Zoom Addon

 

Hi Derek,

You wrote :

If the zoom module isn't present, and you create the AppModule based on appModuleHandler.AppModule, you can no longer assume that anything in the zoom appModule still exists. This is dangerous, because if you make assumptions about the built-in module doing things, you now have to check that you actually are using the real built-in module.



You're right, I see you're the creator of the zoom appModule.

We can distinguish these 2 cases by using a global variable as follows:


zoomIsPresent = False
import nvdaBuiltin
if hasattr (nvdaBuiltin.appModules, "zoom"):
    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
    zoomIsPresent = True
else:
    import appModuleHandler
    ZoomAppModule = appModuleHandler.AppModule



# Then, in the extended class :


class AppModule (ZoomAppModule):

    if zoomIsPresent:
        # We're extending the zoom appModule...
    else:
        # We're extending the appModuleHandler.AppModule...



I know, global variables are not recommended ...

However, the following problem may arise whether the check is done or not.

Since the zoom appModule has only one call to eventHandler.requestEvent in its constructor, in the subclass, it will be necessary to overwrite the constructor of the base class if we prefer that the alerts of people who connect and disconnect are configurable as Ralf had asked.

In this case, if we have to overwrite the base constructor, it wille be better to ignore the builtin appModule and create a new class inheriting from appModuleHandler.AppModule and place our logic for configuring alerts.

What are your thoughts?

Here is the base class of the builtin appModule of zoom:


#appModules/zoom.py:
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2018 NV Access Limited,Derek Riemer
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

import appModuleHandler
import eventHandler

class AppModule(appModuleHandler.AppModule):
    def __init__(self,*args,**kwargs):
        super(AppModule,self).__init__(*args,**kwargs)
        #Explicetly allow alert events for zoom's chat windows.
        #Zoom alerts are not  zoom foreground window descendants.
        eventHandler.requestEvents("alert",processId=self.processID,windowClassName="zoom_acc_notify_wnd")



Thanks.

Kind regards,
Abdel.
Le 10/11/2019 à 08:51, derek riemer a écrit :

Be careful doing this check. If the zoom module isn't present, and you create the AppModule based on appModuleHandler.AppModule, you can no longer assume that anything in the zoom appModule still exists. This is dangerous, because if you make assumptions about the built-in module doing things, you now have to check that you actually are using the real built-in module. I'd recommend not doing this check, and simply marking your addon incompatible with NVDA prior to 2018.3.

 

On Tue, Nov 5, 2019 at 11:36 AM Abdel <abdelkrim.bensaid@...> wrote:

Hi James, Tim and all,

@James:

You wrote :

> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule


This will import the AppModule class of the zoom module even if it is
used in another add-on.

To be certain to extend the zoom appModule belonging to the nvdaBuiltin,
it is better to use the following approach:

> import nvdaBuiltin
> if hasattr (nvdaBuiltin.appModules, "zoom"):
>    ZoomAppModule = nvdaBuiltin.appModules.zoom.AppModule
> else:
>    import appModuleHandler
>    ZoomAppModule = appModuleHandler.AppModule


Then, in your code, you can extend the functionality of this appModule
as follows:

> class AppModule (ZoomAppModule):
>     ...


Take a good look at what's already in the
nvdaBuiltin.appModules.zoom.AppModule class by consulting NVDA sources
to see what you can add.

Kind regards,
Abdel.

Le 05/11/2019 à 18:10, James Scholes a écrit :
> Instead of importing AppModule from appModuleHandler, do:
>
> from appModules.zoom import AppModule
>
> To protect against versions of NVDA without that module built in, you
> could consider:
>
> try:
>  from appModules.zoom import AppModule
> except ImportError:
>  from appModuleHandler import AppModule
>
> Regards,
>
> James Scholes
>
> On 05/11/2019 at 4:36 pm, Tim Harshbarger via Groups.Io wrote:
>> Hi,
>>
>> I am wanting to enhance some things in how NVDA interacts with Zoom
>> (virtual meeting client).  It appears that NVDA already has a Zoom
>> module.
>>
>> How would I import the Zoom module into my addon so I can extend the
>> functionality?  Or should I just overwrite the Zoom module with any
>> addon I create?
>>
>> Thanks!
>>
>> Tim
>>
>> Tim Harshbarger
>>
>> Senior Accessibility Consultant
>>
>> Deque Systems
>>
>>
>
>
>
>




--

Derek Riemer
Improving the world one byte at a time!        ⠠⠊⠍⠏⠗⠕⠧⠬ ⠸⠺ ⠐⠕ ⠃⠽⠞⠑ ⠁⠞ ⠐⠞⠖
•    Accessibility enthusiast.
•    Proud user of the NVDA screen reader.
•    Open source enthusiast.
•    Skier.

•    Personal website: https://derekriemer.com