Re: Empty folders in Window Explorer, issues # 3152 and # 5759




OK, thanks for the reference.

I will comment there since I think this issue may take more importance in the future when more add-ons are accepted in the store.






De : <> De la part de Javi Domínguez
Envoyé : mardi 12 octobre 2021 17:32
À :
Objet : Re: [nvda-addons] Empty folders in Window Explorer, issues # 3152 and # 5759



There is already an issue about this: #9845

El 12/10/2021 a las 12:29, Cyrille via escribió:

Happy for you that you have found this solution.

But it remains a work-around. And it works only because you know the name of the ad-on that conflicts with yours (winTenApp) as well as its content (only one event defined).
Hence my recommendation to open an issue against NVDA to have a general method implemented to stack appModules.


De : "Javi Domínguez"
A :
Envoyé: mardi 12 Octobre 2021 12:17
Objet : Re: [nvda-addons] Empty folders in Window Explorer, issues # 3152 and # 5759

It cannot be done from within the appModule, you have to create a global plugin that does it from outside. I'm testing with this and it seems to work.

import globalPluginHandler

class GlobalPlugin(globalPluginHandler.GlobalPlugin):

import appModules
if hasattr(appModules, "explorer") and "wintenapps" in appModules.explorer.__file__.lower():
    import sys
    import os
    sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'AppModules')))
    import explorer
    setattr(appModules.explorer.AppModule, "event_nameChange", explorer.AppModule.event_nameChange)  

Javi Dominguez

El 11/10/2021 a las 21:12, Rui Fontes escribió:

The prevalent is the last one in alphabetical order...

I have to name my trial add-on to read the File Explorer status bar as ZExplorer in order to work...

If I rename yours to ZZExp... it will be yours to work...

I have tried, but I can't find a way to have all working...


Rui Fontes


Às 16:11 de 11/10/2021, Javi Domínguez escreveu:

Thanks but no. At least it doesn't work for me like you say.

It doesn't matter which class you inherit from, the important thing here is that the one loaded first prevails.
First appModules.explorer is loaded from WinTenApps, then when NVDA loads ExplorerEnhancements, it doesn't updates appModules.explorer because it sees that there is already one in memory and assumes that it is the same. Consequently, the only copy that is actually running is the one that was loaded first.

Check this out on the console with WinTenApps enabled:

>>> appModules.explorer
<module 'appModules.explorer' from 'C:\\Users\\Javichi\\AppData\\Roaming\\nvda\\addons\\wintenApps\\appModules\\'>
>>> appModules.explorer.AppModule.event_nameChange
Traceback (most recent call last):
  File "<console>", line 1, in <module>
AttributeError: type object 'AppModule' has no attribute 'event_nameChange'

And this one with WinTenApps disabled:

>>> appModules.explorer
<module 'appModules.explorer' from 'C:\\Users\\Javichi\\AppData\\Roaming\\nvda\\addons\\ExplorerEnhancements\\appModules\\'>
>>> appModules.explorer.AppModule.event_nameChange  
<function AppModule.event_nameChange at 0x041AEC48>

Look at the path of the module in each case and that if it is appModules.explorer from WinTenApps that is loaded, it does not contain event_nameChange that mine does.

I had the same problem with Mozilla and Developer Toolkits. It can be solved but it is complicated and in this case it is not worth it. It is just an experiment that I wanted to try, it is not my intention that it remain as an addon.


Javi Dominguez


El 11/10/2021 a las 16:25, Cyrille via escribió:

To avoid overriding previously imported appModules, the appModules should import one on top of the other rather than from nvdaBuiltins.appModules.

I mean in win10app add-on as well as in any add-on/module overriding explorer:
from appModules.explorer import *
rather than
from nvdaBuiltin.appModules.explorer import *

I haven't tested yet but I think it should work:
- nvdaBuiltin.appModules contains appModules originally embedded by NVDA
- appModules contains the appModules available at runtime, i.e. appModules from add-ons may have overridden NVDA's ones.

It it is confirmed it can work this way, I will update Outlook extended add-on accordingly to allow other third party Outlook enhancements.



De : "Javi Domínguez"
A :
Envoyé: lundi 11 Octobre 2021 15:44
Objet : Re: [nvda-addons] Empty folders in Window Explorer, issues # 3152 and # 5759


Thanks, indeed that is the problem. WinTenApps must be disabled for it
to load correctly. I had a similar problem with Mozilla and the
Developer Toolkit.

El 11/10/2021 a las 14:56, Alberto Buffolino escribió:
> Javi Domínguez, il 11/10/2021 14.25, ha scritto:
>> Thank you. Could you please go to the folder where the addon was
>> installed and check that there is a folder called __pycache__?
> Alberto:
> Hi Javi,
> it seems that your add-on is not loaded due to WinTenApps. Disabling
> this latter, your add-on is been loaded. I remember an add-on that
> manage this case during import, but not its name.
> Unfortunately, on my system, like you but in Italian, I notice no
> changes in usual behavior.
> I'm thinking about this question from a lot of time, to extend
> ColumnsReview functionality of empty list announcement (already
> working in other lists). Events you used seem correct (I verified with
> a log message), but something goes wrong in obj checks.
> Alberto




Join to automatically receive all group messages.