ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Editors / Code editor
  • Overview
  • How to?
  • Enabling code completion
  • Remarks
  • Code language
  • Automatic completion for types of variables
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Autocompletion is available for WLanguage commands, procedures, variables, data files, items of data files, windows, controls, types of variables, etc.
This Autocomplete functionality reduces the risk of typing errors and saves a lot of time: no need to search for the exact name of a global variable or control, it is automatically suggested!
The automatic completion is used to:
  • complete the current input by suggesting a list of possible values (function name, property name, etc.). All the values suggested in the list contain the word being typed.
    The content of the list is refreshed as you type.
    For example, when you type "OKC", all the elements (functions, controls, constants, code snippets, etc.) containing those letters appear.
    Complete the current input
    Remark: The autocomplete functionality is also available when you change a function that you already entered in the code editor.
    For example, if you want to replace "HReadFirst" with "HReadSeekFirst", when you start typing "Seek" between "Read" and "First", the autocomplete feature automatically shows "HReadSeekFirst". When you select the new function, the old function is automatically replaced.
  • suggest the value of the possible parameters according to the WLanguage function used.
    For example, when using HRead, the first expected parameter corresponds to the name of a data file. In this case, only the data files of the analysis associated with the current project will be suggested.
    Suggestions of possible parameters
  • select a combination of constants for a given parameter.
    To do so, select the desired options (with the arrow keys) and press Space to confirm.
    Once confirmed, all selected options are automatically integrated into the code.
    Remark: Constants are separated in areas highlighted with different colors to identify the constants that can be combined. For example, two constants in the same area with a radio button cannot be selected simultaneously.
    Selection of a combination of constants
  • open the code wizards. These wizards allow you to enter the different parameters of the function by answering simple questions.
    The <Xxx wizard> option indicates that a wizard is available. To open the wizard, select this option.
    Open the code wizards
  • suggest the different available extension attributes on the current line of code.
    An extension attribute corresponds to a directive passed to the compiler. These attributes are powerful and practical. To get the list of extension attributes available on the current element, simply type "<".
    Extension attribute suggestions

    For more details on the available extension attributes, see List of extension attributes.
Remarks:
  • To select one of the suggestions:
    1. Navigate through the list using the arrow keys.
    2. Confirm the selection:
      • with the Enter key.
      • with the Tab key.
  • The drop-down lists can be resized.
  • If your procedure or function uses a project element (window, page, report, etc.), you can include the list of desired elements in the code suggestions. To do so, simply add a specific extension attribute in the declaration of the function or procedure parameters. For more details, see Parameters of a function or procedure.
  • If you use a Data Source variable, simply add a specific extension attribute and associate it with an existing data file or query. In this case, you will be able to directly access the items in the code suggestions. For more details, see Data Source variable.
  • The code editor also offers parameter suggestions, etc. For more details, see Code editor: Code completion.
How to?

Enabling code completion

To enable code completion in your project:
  1. Open the code editor options: on the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
  2. Check "Show code suggestions after" and specify the time after which the code suggestions should appear.
Remark: To disable the automatic completion, uncheck this option.
Remarks

Code language

The WLanguage keywords in the code suggestions are available in English and French.
To change the language used by the automatic completion functionality:
  1. Open the code editor options: on the "Home" tab, in the "Environment" group, expand "Options" and select "Options of the code editor".
  2. Select the language of the code in the "Code language: " combo box.

Automatic completion for types of variables

When you declare a new variable, the different types of variables appear automatically in the code suggestions. Simply write: "MyVariable is ".
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 01/11/2024

Send a report | Local help