- ago
I have implemented a custom configuration for my data provider with GenerateParameters. However, Is there any way to provide a button or any other option to the user to reset the whole configuration (factory reset)?
0
334
Solved
4 Replies

Reply

Bookmark

Sort
- ago
#1
Reset settings Manually:
Go to the User Data Folder.
Close WL.
Open Settings.txt in a Text Editor.
Make a Backup copy of this file.
Search for a line with your Adapter's Name close to the start of the line.
Remove that line.



0
Glitch8
 ( 10.62% )
- ago
#2
You COULD also build a custom settings editor and provide your own reset button. Typically Providers use things like API keys, so providing a reset didn't seem worthwhile.
0
- ago
#3
I tried the following

1. Add a boolean parameter called "Config Reset"
2. Override ProcessConfig in the adapter. When the checkbox is toggles in the UI, the ProcessConfig method is getting called immediately.
3.In the ProcessConfig, I check for the value of the parameter and if it is true
3.a. Reset the parameter list to default state by calling Parameters.ResetToDefaultState()
3.b. Call SaveConfig to save the state

But it doesn't seem to work. The configuration in the UI still stays the same. I tried restarting the app but in vain.

Are there any specific steps to implement in the above flow? I want the parameters to be reset to their default state, the UI be updated to reflect the default config and the config be saved across app restarts.

How can I implement that logic?
0
- ago
#4
I was able to implement config rset using a check box. However, the default config does not reflect in the UI window immediately. They are reflected when I close and reopen the settings window.

I am fine with that for now, but a better built-in way of Config Reset is suggested.
0
Best Answer

Reply

Bookmark

Sort