This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into two sections accessed using the Styles and Options tabs.
The options in this area can attribute specific styles and colors to each 4D language item (fields, tables, variables, parameters, SQL, etc.) and also to each SQL language item (keywords, functions, etc.). Combining different colors and styles is particularly useful for code maintenance purposes.
Language: Use this menu to choose either the 4D or SQL language. You can then specify the styles to be applied in the Method editor for each item listed. This list of items changes according to the language chosen in the menu.
List of item types: Check the style options in the table to set the corresponding graphic attributes for syntax items. You can combine several options for each item. The item label reflects any changes made. To change colors, click on the color icon for an item and a palette appears where you can choose a new color. Notes:
In the 4D language, the "Plain text" item designates all text that does not belong to any other specified type (i.e. symbols, punctuation, literal constants, etc.).
In the 4D language, the "Keywords" item designates programming structures (If/End if, Case of/End case, etc.) that are accessed using Macros. In the SQL language, it designates all the commands and their associated keywords.
This area configures Method editor display options:
Indentation: Changes the indentation value for the 4D code in the Method editor. The width must be specified in points (10 by default). 4D code is automatically indented in order to reveal its structure:
Modifying this default value can be useful if your methods contain complex algorithms with many levels of embedding. Narrower indentation can be used in order to limit horizontal scrolling.
Show Line Numbers: Lets you display the line numbers by default in each window of the Method editor. You can also show/hide line numbers for the current window directly from the Method editor.
Show Lists: lets you choose whether or not to show the lists of objects (Commands, Tables and fields, etc.) by default when the Method editor window is opened. You can also show or hide each list directly from the Method editor.
Matching parentheses: modifies the graphic signaling of corresponding parentheses in the code. This signaling appears whenever a parenthesis is selected. The following options are available:
None: No signaling
Rectangle: Parentheses surrounded by a black line
Background Color: Parentheses highlighted (the color is set in the "Colors" area, see the “Colors” paragraph below)
Bold: Parentheses displayed in bold.
By default, the Rectangle option is selected:
Highlight the line running: Highlights the line that is currently running in the During, in addition to the regular yellow arrow indicator.
If you deselect this option, only the yellow arrow is shown.
This area lets you configure autocomplete mechanisms in the Method editor to adapt it to your own work habits.
Automatic opening of window for: triggers the automatic display of the suggestion window for constants, local and interprocess variables, and tables. For example, when the "Local and interprocess variables" option is checked, a list of suggestions appears when you type the $ character:
You can disable this functioning for certain elements of the language by deselecting their corresponding option.
Validation of a suggestion for: sets the entry context that allows the Method editor to validate automatically the current suggestion displayed in the autocomplete window.
Tab and delimiters: When this option is selected, you can validate the current selection with the Tab key or any delimiter that is relevant to the context. For example, if you enter "ALE" and then "(", 4D automatically writes "ALERT(" in the editor. Here is the list of delimiters that are taken into account: ( ; : = < [ {
Tab only: When this option is selected, you can only use the Tab key to insert the current suggestion. This can be used more particularly to facilitate the entry of delimiter characters in element names, such as ${1}. Note: You can also double-click in the window or press the Carriage return key to validate a suggestion.
This group of options configures the different colors used in the Method editor interface.
Line where the cursor is (active window) / Line where the cursor is (inactive window): Background color of line containing the cursor.
Highlight of the words found: Highlight color of words found in a search.
Highlight of the parentheses: Highlight color of corresponding parentheses (used when pairs of parentheses are signaled by highlighting, see the “Options” paragraph above).
Editing area background: Background color of Method editor window.
Suggested text: Color of autocomplete text suggested by the Method editor.