TWebClientDataSet.Fieldbyname().OldValue is of type Variant, however I am unable to convert it to Double by just assigning it. Aren´t Variants supported?
Hi
Variants are not implemented but you can use JSValue type. It is quite similar to what variants offer in Delphi. For your case you have to cast OldValue which is JSValue to desired type.
To use JSValue - which unit must I add?
declared in unit jsdelphisystem.
But you should be able to use it without including the above unit.
I am not sure but I think pas2js compiler knows JSValue internally like other variable types. May be the declaration in jsdelphisystem is just to satify Delphi side during build process.
Yes, I have to use jsdelphisystem. But how do I convert OldValue to the Double, I need?
Or do you mean: Double(OldValue)? But why would I need jsdelphisystem then?
Yes just cast it to desired type. You do not need jsdelphisystem, I just mentioned it in case you want to have a look in that unit.