However I noticed that whenever the user entered an 'empty' text the I got an exception telling me that the value (which appeared to be a random floatingpoint value like 3E-20 ) was not a valid integer.
Checking the code I saw this :
CODE
function TNxCustomNumberEdit.GetValue: Double;
var
ValidText: string;
begin
if (Text = NullText) then
begin
Value := 0;
Exit;
end;
if Text = '' then Result := FMin else
begin
ValidText := GetValidText(Text, eoAllowFloat in FOptions, eoAllowSigns in FOptions);
if ValidText = '' then ValidText := FloatToStr(Min);
if TryStrToFloat(ValidText, Result) then
begin
AdjustToRange(Result);
FValue := Result;
end else Result := FValue;
end;
I'm guessing that because there is no Return-value for the function the 'random' value is returned whenever 'eoAllowFloat' is enabled, because doing so 'fixes' this but stops the user from entering empty values.











