maybe strange code-construct in DvOrdered used with DvDateTime? (also other combinations are possible)

Hi Rong, Ik would be happy, if you can spare some time coming days to
look at following question

Thanks,
Bert

When DvDateTime is constructed with only a string, which is possible!
Then normalstatus and normalrange will not be set.

When function "isNormal" is used an exception will be raised: "Both
normalRange and normalStatus null"

I wonder if that is a good combination, allowing to construct an object
in one way, but then raising an exception when it is used in its normal
functionality.

Also, in the constructor of DvOrdered there is an empty-if statement,
which looks like a left over, in an experiment about how to handle the
NormalRange and normalStatus question.

Hi Bert,

Sorry for the delay. Must have been occupied with something else when
you raised this. I will look into the issues you reported. But now we
will have to fix them in release 1.0.2 :wink:

Cheers,
Rong

Hi Bert,

Sorry for the delay. Must have been occupied with something else when
you raised this. I will look into the issues you reported. But now we
will have to fix them in release 1.0.2 :wink:

I repaired it like this:

if(normalRange==null) return true;
else {
  return getNormalRange().has(this);
}

I know this is not elegant, but I couldn't think of another solution,
but in my code an Exception at this place was difficult to handle.

It is, I think, a bit of a flaw in a more architectural way of thinking.

Bert