Can a plugin channel's "stored" property be saved/loaded from a setup file?
For device and math channels, the current state of the "stored" property of a channel is saved/loaded from a setup file (.dxs). From what I can tell, this does not seem to be true for plugin channels.
Example:
1) Create a new setup --> custom plugin channel gets mounted in the NewSetup() interface function, and does not change the "stored" property from the default value of TRUE.
2) Navigate to "Ch. Setup" --> "Channels" and turn the "stored" value from TRUE to FALSE.
3) Save setup.
4) Exit Dewesoft.
5) Load setup --> custom plugin channel gets mounted in the LoadSetup() interface function, and, again, does not change the "stored" property from the default value of TRUE.
6) Navigate to "Ch. Setup" --> "Channels" and see the "stored" value of the plugin to be TRUE.
So despite setting the "stored" value to FALSE before saving the setup, the "stored" property ignores what was saved and uses the default value set in code - which leads me to believe the "stored" value within the setup file is being overwritten when mounting the channel in LoadSetup() or that the "stored" property of a plugin channel simply is not saved or loaded from the setup file.
Upon loading a setup, is there any way to set a plugin's "stored" property to what its value was when the setup was saved?
Aside: When creating a new forum post, if "create topic" is clicked without completing the reCAPTCHA, the page is reloaded with an error message displayed at the top of the screen stating "Error! The g-recaptcha-response field is required." The topic title/content the user typed is then collapsed and hidden away behind clicking the "new topic" button again. This is awkward to the user because all they see after the page reload is an error message and everything they typed gone from the screen, which can lead them to believe that everything they typed is lost. Upon page reload from a form validation error, it would be better to automatically expand the "create new topic" section to let the user know that their title/content is still there, or to not reload the page at all and show an error message underneath the captcha stating it is required, or disabling the create topic button until all required fields are complete, etc.
Hi,
Yes you are correct. Plugin channel info does not get stored in the setup file automatically. You have to implement this functionality yourself by handling IPlugin4 "evOnUpdateDwXML" event where you save all relevant plugin info. Then on setup load read this info back and set your plugin channels accordingly.
If you have an older DEWESoft you can use "SaveSetup" method where you save all your info into a VARIANT type that you get it back in the "LoadSetup" method.