4D v14.3OBJECT Get pointer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
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:
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"
Product: 4D
Theme: User Interface
Number:
1124
Created: 4D v12
Focus object
Form Objects (Access)
OBJECT Get name
Objects (Forms)
Self
Subform, focus
4D Language Reference ( 4D v12.4)
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)