[nvda-addons] Re: onUninstall function

  • From: Noelia <nrm1977@xxxxxxxxx>
  • To: nvda-addons@xxxxxxxxxxxxx
  • Date: Wed, 17 Jun 2015 17:16:49 +0200

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: