4D v14.3

METHOD SET COMMENTS

Home

 
4D v14.3
METHOD SET COMMENTS

METHOD SET COMMENTS 


 

METHOD SET COMMENTS ( path ; comments {; *} ) 
Parameter Type   Description
path  Text, Text array in Text or Text array containing one or more method path(s)
comments  Text, Text array in Comments of designated method(s)
Operator in 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 comments of the method(s) designated by the path parameter by those specified in the comments parameter.

The comments modified by this command are those specified in the 4D Explorer (not to be confused with lines of comments in the code). These comments can only be generated for triggers, project methods and form methods. They contain styled text

Note: Forms and form methods share the same comments..

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) // comments for a single method

 ARRAY TEXT(arrPaths;0) // text arrays
 ARRAY TEXT(arrComments;0)
 METHOD SET COMMENTS(arrPaths;arrComments) // comments for several methods

You 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

Example  

Add a modification date to an existing trigger comment:

 METHOD GET COMMENTS("[trigger]/Table1";$comments)
 $comments:="Modif:"+String(Current date)+"\r"+$comments
 METHOD SET COMMENTS("[trigger]/Table1";$comments)

 
PROPERTIES 

Product: 4D
Theme: Design Object Access
Number: 1193

 
HISTORY 

Created: 4D v13

 
SEE ALSO 

METHOD GET COMMENTS

 
ARTICLE USAGE

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)