| 4D v20.1METHOD SET COMMENTS | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v20.1
 METHOD SET COMMENTS 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| METHOD SET COMMENTS ( path ; comments {; *} ) | ||||||||
| Parameter | Type | Description | ||||||
| path | Text, Text array |   | Text or Text array containing one or more method path(s) | |||||
| comments | Text, Text array |   | Documentation 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 SET COMMENTS command replaces the documentation of the method(s) designated by the path parameter by those specified in the comments parameter.
The documentation modified by this command is displayed in the 4D Explorer (not to be confused with lines of comments in the code). It contains:
This documentation can be generated for methods ot type triggers, project methods, form methods, database methods, and classes.
Note: Forms and form methods share the same documentation.
You can use two types of syntaxes, based either on text arrays, or text variables:
 C_TEXT(tVpath) // text variables
 C_TEXT(tVcomments)
 METHOD SET COMMENTS(tVpath;tVcomments) // documentation for a single method ARRAY TEXT(arrPaths;0) // text arrays
 ARRAY TEXT(arrComments;0)
 METHOD SET COMMENTS(arrPaths;arrComments) // documentation for several methodsYou cannot mix the two syntaxes.
If you pass an invalid pathname, an error is generated.
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
Add a modification date to an existing trigger documentation:
 METHOD GET COMMENTS("[trigger]/Table1";$comments)
 $comments:="Modif:"+String(Current date)+"\r"+$comments
 METHOD SET COMMENTS("[trigger]/Table1";$comments)
	Product:  4D
	Theme:  Design Object Access
	Number:  
        1193
        
        
        
	
	Created:  4D v13
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	4D Language Reference ( 4D v20)
	
	
	4D Language Reference ( 4D v20.1)
	
	
	
 Add a comment
Add a comment