4D v16.3

Methods Page

Home

 
4D v16.3
Methods Page

Methods Page  


 

 

This page contains parameters defining the Method editor interface and it default display as well as options concerning its operation. It is divided into three sections accessed using the Styles, Options, and Colors tabs.

Styles  

Font  

These menus set the font and character size used in the Method editor entry area:

  • Font: name of font used.
  • Size: character size.

You can set different font styles for each type of object.

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.

Options  

  • Use regional system settings: allows you to disable/enable the "international" code settings for the local 4D application:
    • When this option is unchecked (default value in 4D v15 and higher), English-US settings and the English programming language are used in 4D methods.
    • If this option is checked, regional settings are used in 4D methods, as in previous 4D versions.
    If you modify this option, you need to restart the 4D application so that the change is taken into account.
    For a detailed description of this option's effects, refer to the Introduction to the 4D Language section.
Options  

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.
  • Highlight the logical blocks (new in v16): When checked, the whole code belonging to a logical block (If/End if for example) is highlighted when the mouse is placed over the expanded node:

    Note: The highlight color can be set in the "Colors" page.
  • Always show block lines (new in v16): Allows to hide vertical block lines permanently. The block lines are designed to visually connect nodes. By default, they are always displayed (except when collapse/expand icons are hidden, see below).
  • Hide collapse/expand icons (new in v16): Allows to hide all expand/collapse icons by default when displaying code. When the option is checked, node icons (as well as local block lines, see above), are displayed temporarily when the mouse is placed over a node:
  • 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:
  • Highlighted text (new in v16): Allows to highlight all occurrences of the same text (variable, field...) in an open method window.

    The following options are available:
    • No (default): No highlight
    • On cursor: all occurrences are highlighted when the text is clicked
    • Selected text: all occurrences are highlighted when the text is selected

    Note: The highlight color can be set in the "Colors" page.

  • Highlight the line running: Highlights the line that is currently running in the debugger (see Debugging), 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.

Colors  

These options configure the various 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.
  • Highlight of the blocks (new in v16): Highlight color for selected logical blocks when the "Highlight logical blocks" option is enabled in the Options page
  • Highlight of the same text (new in v16): Highlight color for other occurrences of the same text when one of the "Highlighted text" option is enabled in the Options page

 
PROPERTIES 

Product: 4D
Theme: Preferences

 
HISTORY 

New
Modified: 4D v16

 
TAGS 

Débogueur

 
ARTICLE USAGE

4D Design Reference ( 4D v16)
4D Design Reference ( 4D v16.1)
4D Design Reference ( 4D v16.3)