~Number fields should have an "unbounded" option. I used Intervals.jl to make sure we can easily define a NumberField widget with no upper and/or lower limits.~
I also realized that there was no type-persistence between the NumberField's returning value and the default value.
~I am not sure whether this is expected, but, as Intervals.jl doesn't provide us with step, we need to keep track of the desired type as the step will always be 1. Thus, I added another step, which converts what we receive from the widget to the NumberField.default type.~
PS.: I think we could remove the numeric_type argument and just get it from default, but this would be very implicit.
EDIT
I added a step field to the constructor, which is only accessed when creating an Interval based NumberField.
EDIT 2
I moved on from interval as it was consensus that string intervals weren't a good parameter. I created an unlisted package UnboundRanges.jl to allow the use of things like (1:10:unbounded) which goes from 1 to infinity with a step of 10.
~Number fields should have an "unbounded" option. I used
Intervals.jl
to make sure we can easily define aNumberField
widget with no upper and/or lower limits.~I also realized that there was no type-persistence between the
NumberField
's returning value and the default value.~I am not sure whether this is expected, but, as
Intervals.jl
doesn't provide us withstep
, we need to keep track of the desired type as the step will always be1
. Thus, I added another step, which converts what we receive from the widget to theNumberField.default
type.~PS.: I think we could remove the
numeric_type
argument and just get it fromdefault
, but this would be very implicit.EDIT I added a
step
field to the constructor, which is only accessed when creating anInterval
basedNumberField
.EDIT 2 I moved on from interval as it was consensus that string intervals weren't a good parameter. I created an unlisted package UnboundRanges.jl to allow the use of things like
(1:10:unbounded)
which goes from 1 to infinity with a step of 10.Here is a preview 😄