Problem with onUninstall function in installTasks.py file


Abdel
 

Thanks Lucasz,

Indeed, I had not read this paragraph in the developer's guide.

This behavior is therefore perfectly normal.

Thanks again.

Kind regards,
Abdel.

Le 11/09/2021 à 10:58, Lukasz Golonka via groups.io a écrit :
Hello,

On Sat, 11 Sep 2021 08:49:40 +0200
"Abdel" <abdelkrim.bensaid@free.fr> wrote:

Opening a file works well with me too.

Have you tried using  gui and gui.messageBox?
I'm not Ibrahim, and I haven't tried this explicitly but this is not
supposed to work. Please note the following quote from the developer
guide:
[...] As this happens on NVDA startup before other components are initialized, this function cannot request input from the user.
In plain language this means that you cannot show any GUI windows when
uninstalling.


Lukasz Golonka
 

Hello,

On Sat, 11 Sep 2021 08:49:40 +0200
"Abdel" <abdelkrim.bensaid@free.fr> wrote:


Opening a file works well with me too.

Have you tried using  gui and gui.messageBox?
I'm not Ibrahim, and I haven't tried this explicitly but this is not
supposed to work. Please note the following quote from the developer
guide:
[...] As this happens on NVDA startup before other components are initialized, this function cannot request input from the user.
In plain language this means that you cannot show any GUI windows when
uninstalling.

--
Regards
Lukasz


Abdel
 

Thanks Ibrahim,

Opening a file works well with me too.

Have you tried using  gui and gui.messageBox?

The following code doesn't work here:

import gui def onUninstall(): gui.messageBox ("Finish", "Finish")


Kind regards,
Abdel.
Le 11/09/2021 à 06:45, Ibrahim Hamadeh a écrit :
Hello Abdel
I have tested it, by opening a text file in documents folder
import os
def onUninstall():
    os.startfile(r"C:\Users\...\file.txt")
and the file opened successfully upon uninstalling the addon.
I also did my tests with the 2021.1 stable version of NVDA.
best regards
ibrahim

On 9/10/2021 10:36 PM, Abdel wrote:
Hi,

We are several to have noticed a problem of non-execution of the "onUninstall" function in the "installTasks.py" module.

"onInstall" works, but not "onUninstall".

I tried to display a message, copy a file, nothing happens.

Could you test and confirm if this is also the case with you?

I did my tests with the 2021.1 stable version of NVDA.

Kind regards,
Abdel.






.








Ibrahim Hamadeh
 

Hello Abdel
I have tested it, by opening a text file in documents folder
import os
def onUninstall():
os.startfile(r"C:\Users\...\file.txt")
and the file opened successfully upon uninstalling the addon.
I also did my tests with the 2021.1 stable version of NVDA.
best regards
ibrahim

On 9/10/2021 10:36 PM, Abdel wrote:
Hi,

We are several to have noticed a problem of non-execution of the "onUninstall" function in the "installTasks.py" module.

"onInstall" works, but not "onUninstall".

I tried to display a message, copy a file, nothing happens.

Could you test and confirm if this is also the case with you?

I did my tests with the 2021.1 stable version of NVDA.

Kind regards,
Abdel.





.


Rémy Ruiz
 

Hi,

I take advantage of the message of Abdel to say that the percentage during  install or uninstall an addon is always displayed zero per cent.

Cheers.

Rémy

Le 10/09/2021 à 21:36, Abdel a écrit :
Hi,

We are several to have noticed a problem of non-execution of the "onUninstall" function in the "installTasks.py" module.

"onInstall" works, but not "onUninstall".

I tried to display a message, copy a file, nothing happens.

Could you test and confirm if this is also the case with you?

I did my tests with the 2021.1 stable version of NVDA.

Kind regards,
Abdel.





Abdel
 

Hi,

We are several to have noticed a problem of non-execution of the "onUninstall" function in the "installTasks.py" module.

"onInstall" works, but not "onUninstall".

I tried to display a message, copy a file, nothing happens.

Could you test and confirm if this is also the case with you?

I did my tests with the 2021.1 stable version of NVDA.

Kind regards,
Abdel.