Tech Tip: Object Property Identifiers
PRODUCT: 4D | VERSION: 16R4 | PLATFORM: Mac & Win
Published On: August 31, 2017
4D V16 R4 introduces object notation. Object Notation follows ECMA Script standards and as such is more restrictive compared to 4D's standards. This can be seen in the object property identifiers.
According to the documentation for the identifiers:
- the first character must be a letter, an underscore (_), or a dollar sign ($)
- subsequent characters may be any letter or digit or an underscore or dollar sign (space characters are NOT allowed)
- they are case sensitive
4D only follows case sensitivity when using objects.
As such the following fails:
The second line fails and is shown by the red dot. Identifiers can not be started with a number.
The third line does not show an error but will fail when ran due to the space in the identifier. It is noticable that the entire identifier is not a single item with the two colors.
Below is the error for the third line:
However using 4D commands these properties are not an issue the following will not generate any errors and run fine:
The debugger shows the following results with no errors: