4D v13.4Method editor |
|||||||||||||||||||||
|
4D v13.4
Method editor
|
Method execution![]() | This button causes the execution of the method. Using the menu associated with the button, you can select the type of execution. Only project and database methods can be run using this button. For more information about these commands, refer to Executing methods. |
Search![]() | Clicking on the search icon causes the display of the standard search dialog box, which allows performing a search in the current method. The associated combo-box can be used to launch a standard search directly: to do this, enter the character string you want to search for and press Enter or the Carriage return. The combo-box also lists the last searches carried out; to redo a search, select it from the combo-box menu. For more information, refer to Find and replace in methods. |
Macros ![]() | This button displays a menu listing all available macro-commands. For more information, refer to Creating and using macros. |
Expand all / Collapse all![]() | These buttons allow expanding or collapsing all the control flow structures of the method. For more information, refer to "Expand / Collapse" in Writing a method. |
Show or hide lists![]() | This button allows displaying or hiding the lists in the window. For more information, refer to the "Lists area" section. |
Method information![]() | This button causes the display of the Method Properties dialog box (project methods only). For more information, refer to Project method properties. |
Last Clipboard values![]() | This button displays a menu listing the last 20 items copied in the window. If you select an item, it is recopied at the spot where the cursor is located. |
Clipboard![]() ![]() | These 9 icons represent the 9 clipboards available in the Method editor. A white icon containing a number indicates that a clipboard contains data; an orange icon indicates an empty clipboard. You can use these clipboards by clicking on them directly or by using keyboard shortcuts. For more information, refer to Writing a method. |
Lock(4D Server only) ![]() | This icon indicates that the method is locked by another user. Clicking the padlock allows reloading the method (and thus displaying any changes made by the other user). |
The editing area contains the text of the method. You enter and modify the method text in this area. The editor automatically indents method text and colors the different syntax elements for clear method structure.
You can customize the display of this area. Any customization is automatically passed on to all the windows of the editor.
For more information about entering code in this area, refer to Writing a method.
The lists area lets you display one or more lists of elements necessary for writing methods (commands, constants, forms, etc.). You can choose the number and contents of the lists displayed in the window.
By default, the Method editor displays four lists. You can enlarge or reduce the relative width of each list area by dragging one of its partitions. It is also possible to adjust the size of the list area in relation to that of the editing area by dragging the dividing line between them.
You can save the parameters set in the Method editor window in the form of a template. For more information, refer to Save as template.
You can display the following lists of items in the lists area of the Method editor window:
Note: Except for the Macros element, all the lists are in alphabetical order.
This area, located to the left of the editing area, allows you to display the line numbers and to insert break points directly next to specific instructions. Break points are useful during the debugging phase of your programming. They stop the execution of your code at specific locations and display the debugger.
To insert a break point, click in the break points area at the location you want it to be placed or choose the Toggle Breakpoint command from the context menu of the editor. A red dot indicates the presence of a break point.
You can display the location of all the break points present in the database in the Runtime Explorer.
To delete a break point, click the red dot or choose the Toggle Breakpoint command in the context menu again.
To temporarily disable a break point or modify its properties, press the Alt key (Windows) or the Option key (Mac OS) while clicking on the break point or choose the Edit Breakpoint... command in the context menu of the editor. When you click the break point, the break point property window is displayed. For a complete description of break points, refer to Break Points in the 4D Language Reference manual.
You can display or hide the line numbers in the break points area for each window of the Method editor.
Displaying the line numbers makes it easier to find your way around in the window. The Go to Line Number... command in the Method menu also lets you take advantage of this display (see the "Goto Line..." section of Find and replace in methods).
The status bar located at the bottom right part of the editor window displays the position of the cursor at all times:
You can save the parameters set in the Method editor window in the form of a “template.” Once the template is saved, the parameters set in it will be used for each new Method editor window that is opened.
The following parameters are stored in the template:
To save a Method editor window as a template, choose the Save As Template command in the Method menu. The template is saved immediately (no dialog box appears). It is stored in the Preferences of the 4D application. If a previous template already exists, it is replaced.
Product: 4D
Theme: Editing methods