- Moderator
- #1
Hello,
I found something weird in Settings Configuration but may be can you help me ?
In external MP plugins, when using this for saving parameters :
It appears that the effective write (real I/O) on xmlfile appears only when hiting OK button from main MP config window.
Then, if we have our own "save" button in our plugin, users can believe plugin's params are saved wrongly if they hit on cancel button after.
Maybe this was created this way only for internal MP plugins, for performance purpose or, for lock files problems ? Don't know.
Is it possible to correct that (if any) ?
Is there something missing in the plugin's code ?
Or, is it better to write directly own plugin xml file in this case ?
Many questions (sorry) but I would like to know.
Regards.
I found something weird in Settings Configuration but may be can you help me ?
In external MP plugins, when using this for saving parameters :
Code:
using (Settings xmlwriter = new Settings(Config.GetFile(Config.Dir.Config, "plugin_name.xml")))
{
xmlwriter.SetValue("plugin", "label", label.ToString());
}
It appears that the effective write (real I/O) on xmlfile appears only when hiting OK button from main MP config window.
Then, if we have our own "save" button in our plugin, users can believe plugin's params are saved wrongly if they hit on cancel button after.
Maybe this was created this way only for internal MP plugins, for performance purpose or, for lock files problems ? Don't know.
Is it possible to correct that (if any) ?
Is there something missing in the plugin's code ?
Or, is it better to write directly own plugin xml file in this case ?
Many questions (sorry) but I would like to know.
Regards.
France