4D v13.4METHOD SET CODE |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v13.4
METHOD SET CODE
METHOD SET CODE
The METHOD SET CODE command modifies the code of the method(s) designated by the path parameter with the contents passed in the code parameter. This command can access the code of all types of methods: database methods, triggers, project methods, form methods and object methods. In the case of a project method: if this method already exists in the database, its contents are replaced; if it does not exist, it is created with its contents. You can use two types of syntaxes, based either on text arrays, or text variables: C_TEXT(tVpath) // text variables ARRAY TEXT(arrPaths;0) // text arrays You cannot mix the two syntaxes. If you pass an invalid pathname, the command does nothing. . If the first line of the method code contains valid metadata, they are used to specify the method attributes and the first line is not inserted. Example of metadata: // %attributes = {invisible:true,lang:"fr"} Note: These metadata are generated automatically by the METHOD GET CODE command. You can execute this command from a component, but in this case, you must pass the * parameter because access to the component code is read-only. If you omit the * parameter in this context, the error -9763 is generated This example exports and imports all the project methods of an application: $root_t:=Get 4D folder(Database Folder)+"methods"+Folder separator |
PROPERTIES
Product: 4D
INDEX HISTORY
SEE ALSO |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||