The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
[SOLVED] Default value not used?
My operator has an Int parameter for which I set a default value (in the getParameterTypes() method):
But once the operator is instantiated in the GUI, the parameter's edit box remains empty and the GUI displays the problem "The mandatory parameter "exampleset chunk size" is undefined." What am I doing wrong?
type = new ParameterTypeInt(PARAMETER_CHUNK_SIZE,
I18N.getMessage(I18N.getGUIBundle(), "gui.label.rmx_LTFDataReader.parameter.chunk_size.description"), 1, Integer.MAX_VALUE, false);
type.setDefaultValue(IndexCachedLTFExampleTable.DEFAULT_BATCH_SIZE);
types.add(type);
...
Tagged:
0
Answers
your right. If you use the constructor you have posted setting the default value with setDefaultValue() will not change the default value.
This is indeed a bug that I've just fixed. To avoid the problem with your current version I would recommend you to use the ParameterType declartion this way: Best,
Nils