What’s the difference between both Value and AsValue properties?

Written by Francisco R.

As much Value as AsValue can be used to obtain a control’s value, although they can also be used to assign a value to a concrete control, however, you will notice the differences between them upon obtaining the values.

When you use Value in order to know the value, this property could return a NULL value (when the control doesn’t contain anything), nevertheless, when you are using AsValue, this property will never return a NULL, for instance:

  • A DataType control dtyString without value return:
    • Value = NULL
    • AsValue = ”
  • A DataType control dtyInteger without value returns:
    • Value = NULL
    • AsValue = 0

Later you could use the JfVarIsNull function (JfUtil unit) to know if Value is/isn’t NULL.

You may also like…

JfControls 21.07.09 released

JfControls 21.07.09 released

Today we are excited to introduce the new version of JfControls 21.07.09 compatible with RADStudio 10.4. Improvements ... ⦁ Improvements in compatibility with Delphi 10.3.3 and CBuilder 10.3.3 (32Bit & 64Bit). ⦁ Compatibility with Delphi 10.4 and CBuilder 10.4...

RAD Studio 10.4 is Here

RAD Studio 10.4 is Here

RAD Studio 10.4 Radically Improves Native Windows Development We are pleased to announce the General Availability of RAD Studio 10.4. Version 10.4 brings significant improvements for Windows 10 VCL (Visual Component Library) desktop development, Delphi multi-device...


Submit a Comment