KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Declaring a Value List versus a Choice List
PRODUCT: 4D | VERSION: 6.5 | PLATFORM: Mac & Win
Published On: July 27, 2001

When you create a tab object, there are several ways that you can assign the titles for each tab. The two most common ways to do this are:

1) Assigning an existing list to the object. It can be done simply by selecting one of the pre-created lists for the Choice List (in the Property List or Object Properties).

2) Creating a default list for the tab object. You can this by manually adding the list items into the Value list (in the Property List) or Default Value (in Object Properties).

Both of these procedures produce the same result. They assign each element in the list as the title to each tab. However, 1) and 2) create a different property of the tab variable.

In 1), the tab variable is expected to be a numeric type (C_LONGINT). It will hold the reference number of the list (please refer to the 6/8/2001 Tech Tip at: https://www.4d.com/support/tips01-600.html).

In 2), 4D takes the tab variable as an array type. Each element that you created in the Value List is considered to be an array element. Therefore, you should always declare your tab variable as either ARRAY STRING or ARRAY TEXT. This will eliminate a possibility of the disappearance of the tab titles in the compiled database.