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…

JfControls 24.12.05 released

JfControls 24.12.05 released

Improvements … ⦁ Compatibility with Delphi 12.0 and CBuilder 12.0 (32Bit & 64Bit).⦁ Windows 11 detection in JfPlatform function.⦁ Refactoring of the design windows so that their position and size are saved between Delphi/C++Builder executions.⦁ New procedure for...

Enterprise application development

Enterprise application development

To develop business applications, tools that have the following characteristics are needed: Flexibility, adaptability, ease, expandability. Support multiple device types. Ability to react to the changes that our clients demand. Extended support for managing different...

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...

0 Comments

Submit a Comment