4D v14.3METHOD GET CODE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
METHOD GET CODE
|
METHOD GET CODE ( path ; code {; *} ) | ||||||||
Parameter | Type | Description | ||||||
path | Text, Text array |
![]() |
Text or Text array containing one or more method path(s) | |||||
code | Text, Text array |
![]() |
Code of designated method(s) | |||||
* | Operator |
![]() |
If passed = command applies to host database when executed from a component (parameter ignored outside of this context) | |||||
The METHOD GET CODE command returns, in the code parameter, the contents of the method(s) designated by the path parameter. This command can return the code of all types of methods: database methods, triggers, project methods, form methods and object methods.
You can use two types of syntaxes, based either on text arrays, or text variables:
C_TEXT(tVpath) // text variables
C_TEXT(tVcode)
METHOD GET CODE(tVpath;tVcode) // code of a single method
ARRAY TEXT(arrPaths;0) // text arrays
ARRAY TEXT(arrCodes;0)
METHOD GET CODE(arrPaths;arrCodes) // code of several methods
You cannot mix the two syntaxes.
If you pass an invalid pathname, the code parameter is left empty and an error is generated.
In the text of the code generated by this command:
// %attributes = {"lang":"fr","invisible":true,"folder":"Web3"}
If the command is executed from a component, it applies by default to the component methods. If you pass the * parameter, it accesses the methods of the host database.
Refer to the example of the METHOD SET CODE command.
Product: 4D
Theme: Design Object Access
Number:
1190
Created: 4D v13
Modified: 4D v14
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)
Inherited from : METHOD GET CODE ( 4D v13.5)