This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20 R7
OBJECT Get pointer
|
OBJECT Get pointer {( selector {; objectName {; subformName}})} -> Function result | ||||||||
Parameter | Type | Description | ||||||
selector | Longint |
![]() |
Object category | |||||
objectName | Text |
![]() |
Object name | |||||
subformName | Text |
![]() |
Subform object name | |||||
Function result | Pointer |
![]() |
Pointer to object variable | |||||
The OBJECT Get pointer command returns a pointer to the variable of a form object.
This command can be used to designate different objects according to the value of the selector parameter. You can pass one of the following constants (found in the "Form Objects (Access)" theme) in this parameter:
Note: When it is used in the context of a list box, OBJECT Get pointer with Object current or Object with focus selectors returns a pointer to the list box, the column, or the header, depending on the context. For more information, please refer to the Managing List Box Objects page.
The optional subformName parameter lets you retrieve a pointer to an objectName object that does not belong to the current context, in other words, in the parent form. To be able to use this parameter, you must have passed the Object named selector.
When the subformName parameter is passed, the OBJECT Get pointer command first looks for the subform object named subformName in the current form, then looks inside this subform for an object named objectName. If this object is found, it returns a pointer to the variable of this object.
Given a form "SF" used twice as a subform in the same parent form. The subform objects are named "SF1" and "SF2". The "SF" form contains an object named CurrentValue. In the "On Load" form event of the form method of the parent form, we want to initialize the CurrentValue object of SF1 to "January" and that of SF2 to "February":
C_POINTER($Ptr)
$Ptr:=OBJECT Get pointer(Object named;"CurrentValue";"SF1")
$Ptr->:="January"
$Ptr:=OBJECT Get pointer(Object named;"CurrentValue";"SF2")
$Ptr->:="February"
Focus object
Form Objects (Access)
OBJECT Get name
OBJECT Get subform container value
Objects (Forms)
Self
Product: 4D
Theme: Objects (Forms)
Number:
1124
Created: 4D v12
Subform, focus
4D Language Reference ( 4D v20 R7)