4D v16.3

Object names

Home

 
4D v16.3
Object names

Object names  


 

Each active form object is associated with an object name and a variable name. The variable name can be different from the object’s name. In the same form, you can use the same variable several times but each object name must be unique.

Note: Object names are limited to a size of 255 bytes and for variable names the size is limited to 31 bytes.

When using 4D’s language, you can refer to an active form object by either its variable name or object name (for more information about this, refer to Object Properties in the 4D Language Reference manual).

For more information about naming rules for form objects and variables, refer to GET REGISTERED CLIENTS (the rules are the same) as well as to Identifiers in the 4D Language Reference manual.

You can now leave it to 4D to create variables associated with your form objects (buttons, enterable variables, check boxes, etc.) dynamically and according to your needs. To do this, just leave the "Variable Name" field blank in the Property list for the object:

For more information, refer to Variables in the 4D Language Reference manual.

Variables associated with form objects can now contain any type of expression that returns a value — and no longer variable names only. You can simply enter the expression directly in the “Variable Name” area of the Property List for the object:

Any valid 4D expression is allowed: simple expression, formula, 4D function, project method name or field using the standard [Table]Field syntax. The expression is evaluated when the form is executed and reevaluated for each form event. Naturally in this case it is not possible to manage the value of the variable by programming. 

Multiple possibilities are offered by this principle. For example, it means that you can associate a numeric field with a thermometer in order to display values graphically in lists:

Note: If the value entered corresponds to both a variable name and a method name, 4D considers that you are indicating the method.

 
PROPERTIES 

Product: 4D
Theme: Properties for active objects

 
HISTORY 

 
ARTICLE USAGE

4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)