[nvda-addons] Re: <DKIM> Re: onUninstall function

  • From: Paulber19 <paulber19@xxxxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Mon, 22 Jun 2015 09:28:40 +0200

Hi Noelia,
Sorry for my late replybut I had some problem with my mail server.
I have solve the onUninstall function problem .
I've forgotten that this function is called at NVDA restart and that all NVDA module are not load at this time.
So if a addon have a configuration file, we cannot ask the user if I want to keep this configuration file for future new addon installation.
In this way, it begins complicated to manage a addon configuration file for an addon update version because in the onUnstall function we don't know that that it is an update.
Do you know if it exists an addon with a configuration file?
Thanks.
Best regards.
Paul.
Le 17/06/2015 17:16, Noelia a écrit :

Hi, please, if you haven't done this, read the Developer guide, where
it's explained that onUninstall function can't request input from the user:
http://www.nvaccess.org/files/nvda/documentation/developerGuide.html
To remove your configuration file, you can try to use os.unlink or
os.remove:
https://docs.python.org/2/library/os.html

In our add-ons website, you can find examples of add-ons which have
options to copy their configurations so that it remains after the add-on
is uninstalled, and can be imported to the add-on when it's reinstalled,
just if the user has chosen to copy the add-ons settings in the NVDA's
user configuration folder. Otherwise these settings are deleted when
uninstalling the add-on, since the add-on configuration is saved inside
of the add-on folder.
For instance, you can see installTask module of Emoticons add-on.
Thanks.


El 17/06/2015 a las 15:30, Paulber19 escribió:
Hi,
My addon have a config file stored in userConfig.
I want delete this config file when this addon is desinstalled.
How I can do it ?
It's possible to ask the user if he want to keep its addonconfig for
future use. ?
I try to use the onUninstall function but with no result.
Thank's.
Best regards.
Paul.
----------------------------------------------------------------
NVDA add-ons: A list to discuss add-on code enhancements and for reporting bugs.

Community addons are available from: http://addons.nvda-project.org
To send a message to the list: nvda-addons@xxxxxxxxxxxxx
To change your list settings/unsubscribe:
//www.freelists.org/list/nvda-addons
To contact list moderators: nvda-addons-moderators@xxxxxxxxxxxxx


Other related posts: