I have developed a node that executed successfully. I then saved the workflow and reloaded it.
Now I want to rerun it. So I try to reset it first.
I then get a null pointer exception because I want to reset some parameter in the NodeDialog.
Am I correct in assuming that this is the correct behavior? Should I have saved the state of this particular variable in a settingsModel?
Thanks for the clarification.
Values of user settings should be saved in
saveSettingsTo, and loaded in
loadValidatedSettingsFrom. The method
validateSettings checks the settings only (basic, mostly existence tests), but must not modify local variables.
This can be done most conveniently with SettingsModels - especially if you use DefaultComponents in the dialog.
User settings must not be changed/cleared in the reset method. Reset only clears computed data. Only data that is stored internally in the node is reset (don’t reset an output table). In most cases only nodes with a view will implement reset.