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

Written by Jose Antonio

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…

Enterprise application development

Enterprise application development

Para el desarrollo de aplicaciones empresariales se necesitan herramientas que tengan las siguientes características: Flexibilidad, adaptabilidad, facilidad, capacidad de expansión.Soporte de múltiples tipos de dispositivos.Capacidad de reacción ante los cambios que...

JfControls 23.01.10 released

JfControls 23.01.10 released

Improvements ... ⦁ Compatibility with Delphi 11.0 and CBuilder 11.0 (32Bit & 64Bit).. Fixed ... ⦁ Minor bug fixes. We wanted to release a new version of compatibility with Delphi 11.0 and CBuilder 11.0 before releasing a new version that will bring many important...

What’s Coming in 10.4.2 Sydney

What’s Coming in 10.4.2 Sydney

Am I the only one who gets excited about new releases? If you look at the RAD Studio Roadmap you will see a new 10.4.2 release of Sydney is scheduled for the first half of 2021. If you are on Update Subscription then you were invited to the NDA 10.4.2 Hunter beta....

0 Comments

Submit a Comment