4D v13.4Using comments |
||
|
4D v13.4
Using comments
Using comments
The Explorer allows you to write comments about objects in your database. Using comments is particularly appropriate for databases being developed by multiple programmers and is generally good programming practice. Your comments are displayed in the preview area of the Explorer. The following objects accept comments:
A comment can be entered as styled text (i.e., the characters can have different font styles or colors, etc.) that can be modified and viewed at any time in the Explorer. It can contain a description of an object with which it is associated as well as any information necessary to understand how the object functions in the database. The comments you create are stored in the database’s structure. Moreover, 4D allows you to generate automatic comments, which means that 4D automatically enters comments when an object is created or modified. Compatibility note: Since version 12 of 4D, comments inserted in the method header using the // characters are displayed as help tips when the method is referenced in another method (see the "Using help tips" paragraph in WA SET EXTERNAL LINKS FILTERS). This function, which is particularly useful for documenting user methods, is not compatible with comments placed in the Explorer. If you want to use method headers in this way, then do not enter comments in the Explorer. You create, view, and modify comments from the Explorer. To add a command when the preview area is displayed, select the object in the list of the Explorer and then click the Comments button located below the preview area. When the Comments option is selected, the preview area is replaced by the Comments area and you can then enter or modify the text displayed. 4D Server: The Locking icon located in the bottom left corner of the area, indicates whether the comment is already being edited by another user. If this is the case, the pencil has a slash through it and the comment can only be viewed. The text is saved as soon as you click outside of the entry area. You can enter up to 32,700 characters of text for each object You can use the standard text editor commands (Copy, Paste, Select All, etc.) available in the context menu or by using keyboard shortcuts in the Comments area. You can also navigate the text in the comments area by using navigation keys as you would for any other text area. You can enhance the style of the comments (add bold or italics) and change the font attributes (font, font style, font size, or color) using a context menu. To modify the style of the comments’ text:
It is possible to activate an automatic commenting system that can be used for methods and forms in the database. When this system is activated, a comment is automatically associated with every method or form created or modified in the database. An automatic comment can consist of both static text (such as “Modified by”) and variables (such as the current date, current time, and current user as specified in the 4D passwords). Automatic comments are defined for the application on the General page of the Database Settings dialog box (see ). As with standard comments, you can view them using the Explorer. To activate the automatic commenting system:
For example, if you enter the following values: The automatic comment will be added to the comments for all new methods and forms, as well as all existing methods and forms that are modified after automatic commenting is turned on: Note: If your database doesn’t have a password system, #N returns the string “Designer.” 4D Server: Automatic comments can be modified by any client workstation that has access to the Database Settings. You can also modify these parameters in the Database Settings of the server machine. Every modification made to the automatic comments page is immediately taken into consideration by each client workstation as soon as an object is modified and its comments are accepted. |
PROPERTIES
Product: 4D SEE ALSO |