Reset on right mouse pop-up

I'm not sure whether there is a de facto standard way to restore default configuration settings to a node. One might wish to do so prior to execution of a node as well as later. However, prior to executing a node the Reset item is disabled (grey) and the comments in the reset method example do not help me. Obviously, if you do change the configuration then the status any models built and outputs should be set to invalid - as is the case when the inputs are changed.


there is no way for a KNIME user to reset the settings of a node to the default configuration. The way to go would be deleting the node and drag a new one into the workflow.
The "Reset" function is not intended to reset user settings, it resets the node's outputs and clears whatever has been computed during execute. (Thus it's disabled before the node is executed.)
As a developer, when implementing a new node, you are not changing any user settings in the reset method. Reset clears the datastructures that have been filled during execute (and that will be written out (/read in) during saveInternals(/loadInternals)). And the reset method is also the only place where this is happening. In the configure (or loadSettings) method you wouldn't change/delete your internal models - eventhough the new settings/incoming table specs don't match with it anymore - because the framework ensures that reset is being called before new settings or a new table spec is being applied.
When implementing a node you don't really change (or set) user settings (except for taking them over in the loadValidatedSettings method - and maybe applying default settings in the configure method, where possible). So, there is no place/method for restoring default settings.

Did that clear things a bit, or was I completely off?
- Peter.

Perhaps I should have phrased my post more carefully.

Some initial user feedback I've had some some nodes I've developed included a requirement to restore default options/configuration. Obviously, a GUI component which did this would also have to clear any internal models, output etc. This isn't unusual in sophisticated applications but appears to be missing in KNIME. The current "Reset" menu item gives scope for confusion because a user would expect it to reset to the default options/configuration (and implicitly any internal models, outputs etc).

On reflection, I don't see why a user would wish to use the reset item on the right pop-up menu. The logical circumstances to use this would be if the configuration and/or inputs changed when the outputs and any internal models become invalid anyway.

The only thing not available in KNIME is the ability to explicitly set user settings to default values. Otherwise KNIME is sophisticated enough to reset a node after user settings have changed (it even asks the user if s/he really wants to loose previously computed data) or input connections change.
Most nodes don't have default settings. Most nodes require a column to be selected or expect the user to make some explicit choices. If your node provides useful default settings you could add a button to your node's dialog that sets the default values in the dialog's components.

KNIME clearly distinguishes between user settings and computed data/models. Reset only clears computed data/models. If a user understands that, it is not confusing at all. It does not change user settings. And you don't want to reset user settings, as a user may apply the carefully adjusted settings to new (or more) data in a second run. I agree it is not absolutely necessary to have a reset button (or menu item) as KNIME resets the node when needed. But it's convenient (you may want to be able to reset some nodes before you pass a workflow to a colleague, for example).

So, to come back to the question in your first post, the best way to implement such a reset of user settings to default values is in the dialog. That gives the user the chance to review them and to okay them.

- Peter.

In my experience. in the Life Sciences, sensible defaults for the functionality each node provides can normally be provided - and I agree it would be very tempting not to restore defaults for column selectors, file selectors etc as it is usually other settings that need to be restored. In Life Science computations as in statistics, making the appropriate settings changes can be inspired guess work or an interactive process.

I would have expected this issue to have arisen before and a standard solution adopted - I understand that this is not the case. I was not inclined to pursue placing a 'Use defaults' button on panel of the dialog - it logically should be between 'Apply' and 'Cancel' below the panels selected by the tabs with the minimum of additional code and should then affect all tabs. Perhaps this could be usefully discussed at the forthcoming workshop.