ConfigBlock: change groupName, noneAction and duplicateAction
The groupName
variable was made an option from all blocks.
So that it is possible to set options for any block from an arbitrary point in the code, an
groupName
option was added that tags a block so that it (and any other blocks with the same
groupName
) can be referenced at any time.
Removed code used to potentially throw an error if an option was set more than once. This can be the responsibility of the user.
The behavior of noneAction
was changed. noneAction
is set when adding a variable rather than
when setting a value for an option. The idea is that the author of the class would know whether
it is okay for an option to be set to None
and what they want to happen if that happens. It
would be the users responsibility to make sure they pass the correct values in their code.
By default, if an option is set to None
, it is ignored. This decision was made based on the
behavior in the many make
functions.
Note:
- Removing
groupName
will break custom blocks not part of the central code. To fix this, removegroupName
from__init__
. - The
make
functions typically setignoreAction='ignore'
. Since this was removed fromsetOptionValue
, this will need to be removed from any custommake
functions.