* Howto save and use setting from within a plugin?

For users to report plugin bugs and request plugin enhancements; and for authors to test new/new versions of plugins, and to discuss plugin development (in the Programming Technicalities sub-forum). If you want advice on choosing or using a plugin, please ask in General Usage or an appropriate sub-forum.
Post Reply
avatar
JoopvB
Superstar
Posts: 328
Joined: 02 May 2015 14:32
Family Historian: V7

Howto save and use setting from within a plugin?

Post by JoopvB » 27 Feb 2021 11:19

I have a few plugins that may be of interest for Dutch users. One of them parses data from often used websites and uses the result to fill the (meta) fields of a source.

To make the plugin usable for others I need to provide a mapping from the parsed data to 'their' (meta) fields. Hence my question: what would be an easy way (I don't want to go into iup, that's one step to far for me) of providing the user with a kind of preference/settings plugin to set these mappings and make them available to the other plugins to use them when relevant.

User avatar
ColeValleyGirl
Megastar
Posts: 4854
Joined: 28 Dec 2005 22:02
Family Historian: V7
Location: Cirencester, Gloucestershire
Contact:

Re: Howto save and use setting from within a plugin?

Post by ColeValleyGirl » 27 Feb 2021 11:22

Have a look at the functions saveOption, loadOptions and resetOptions in fhutils for loading/saving etc.

Also look at getParam in fhUtils, which uses iup but insulates you from it.

Post Reply