You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"stepSize" attribute is ignored in slider input dialogs using script editor #205
@imagejan mentioned that stepSize attribute is ignored, for example, when calling:
// @int(label="test", min="0", max="100", stepSize="10", style="slider") a
print(a)
Notice that there is another bug here, which is that min/max must be specified or it will hang the program.
After some investigation, it seems that this is due to some known bug as there is a "FIX ME" in the code.
I think the reason to this bug is that there is no converter that converts String to Number in Scijava right now. We could create such converter. But I don't understand why we want to use Number as the type for stepSize. If the input is an int, then max/min/stepSize should all be int, right? Same should apply to doublelong etc. Then we can just use item.getType as the type to parse the stepSize String given. @ctrueden
When I first designed the ModuleItem interface, stepSize was indeed typed on T. And there was some problem with it (I forgot the details), which I worked around by typing it on Number. It is probably not correct, but it's how things are for now. We could consider changing it for SciJava Common 3.0.0 I suppose.
Activity
ctrueden commentedon Nov 20, 2015
When I first designed the
ModuleIteminterface,stepSizewas indeed typed onT. And there was some problem with it (I forgot the details), which I worked around by typing it onNumber. It is probably not correct, but it's how things are for now. We could consider changing it for SciJava Common 3.0.0 I suppose.Anyway, this issue is fixed in c0ffe39.
Fix bug of ignoring the step size of a parameter
Fix bug of ignoring the step size of a parameter