4D v14.3RESOLVE POINTER |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
RESOLVE POINTER
|
RESOLVE POINTER ( aPointer ; varName ; tableNum ; fieldNum ) | ||||||||
Parameter | Type | Description | ||||||
aPointer | Pointer |
![]() |
Pointer for which to retrieve the referenced object | |||||
varName | String |
![]() |
Name of referenced variable or empty string | |||||
tableNum | Longint |
![]() |
Number of referenced table or array element or 0 or -1 | |||||
fieldNum | Longint |
![]() |
Number of referenced field or 0 | |||||
The RESOLVE POINTER command retrieves the information of the object referenced by the pointer expression aPointer and returns it into the parameters varName, tableNum, and fieldNum.
Depending on the nature of the referenced object, RESOLVE POINTER returns the following values:
Referenced object | Parameters | ||
varName | tableNum | fieldNum | |
None (NIL pointer) | "" (empty string) | 0 | 0 |
Variable | Name of the variable | -1 | 0 |
Array | Name of the array | -1 | 0 |
Array element | Name of the array | Element number | 0 |
Table | "" (empty string) | Table number | 0 |
Field | "" (empty string) | Table number | Field number |
Notes:
Within a form, you create a group of 100 enterable variables called v1, v2... v100. To do so, you perform the following steps:
a. Create one enterable variable that you name v.
b. Set the properties of the object.
c. Attach the following method to that object:
DoSomething(Self) ` DoSomething being a project method in your database
d. At this point, you can either duplicate the variable as many times as you need, or use the Objects on Grid feature in the Form Editor.
e. Within the DoSomething method, if you need to know the index of the variable for which the method is called, you write:
Note that by constructing your form in this way, you write the methods for the 100 variables only once; you do not need to write DoSomething (1), DoSomething (2)...,DoSomething (100).
For debugging purposes, you need to verify that the second parameter ($2) to a method is a pointer to a table. At the beginning of this method, you write:
See example for the DRAG AND DROP PROPERTIES command.
Product: 4D
Theme: Language
Number:
394
Created: 4D v6
DRAG AND DROP PROPERTIES
Field
Get pointer
Is a variable
Nil
Table
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)