4D v14.3

Self

Home

 
4D v14.3
Self

Self 


 

Self -> Function result 
Parameter Type   Description
Function result  Pointer in Pointer to form object (if any) whose method is currently being executed. Otherwise Nil (->[]) if outside of context

This command is kept only for compatibility reasons. Starting with version 12 of 4D, it is recommended to use the OBJECT Get pointer command.

The Self command returns a pointer to the object whose object method is currently being executed.

Self is used to reference a variable within its own object method. It returns a valid pointer when it is called from within an object method or from within a project method that is called directly or indirectly by an object method.

If Self is called out of context, it returns a Nil pointer (->[]).

Tip: Self is useful when several objects on a form need to perform the same task, yet operate on themselves.

Note: When it is used in the context of a list box, the function returns a pointer to the list box or the column of the list box depending on the context. For more information, please refer to the Contextual click section.

Example  

See the example for the Appendix D, Additional Information... command.

 
PROPERTIES 

Product: 4D
Theme: Language
Number: 308

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

OBJECT Get pointer
RESOLVE POINTER

 
ARTICLE USAGE

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)

Inherited from : Self ( 4D v11 SQL Release 6)