PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Overview
  • How to proceed?
  • Enabling the automatic prefixing
  • Dsabling the automatic prefixing
  • Creating a code style
  • Modifying a code style
  • Modifying the code style used
  • Enabling/Disabling the display of prefixes in the code editor
  • Add prefixes automatically
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Warning
From version 24 (75), Programing charter is kept for backward compatibility. This function is replaced by Code style.
Overview
A code style is used to automatically prefix the name of all the variables and project elements (windows, report controls, classes, etc.). This automatic prefixing is used to easily identify and/or find an element of a given type.
In the following example, the type of the controls used can be easily identified:
Note: You can also find out the type of an element via the tooltip displayed when the element is hovered by the mouse cursor:
How to proceed?

Enabling the automatic prefixing

To enable the automatic prefixing:
  1. Display the project description ("Project .. Project description").Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. Display:
    • WINDEV Mobile the "Options" tab.
    Display the "Options" tab.
  3. Check "Automatically prefix the variables and the elements found in the project".
  4. choose the desired code style. The "Standard" charter (supplied with WINDEV, WEBDEV or WINDEV Mobile) is used by default.Choose the code style to use. The "Standard" style (supplied with WINDEV, WEBDEV or WINDEV Mobile) is used by default.
  5. Validate. When creating new elements or new variables, the corresponding prefixing will be automatically added.
Notes:
  • To enable the automatic prefixing, you also have the ability to select "Project .. Programming charter .. Use the charter".Another solution to enable the automatic prefixing: on the "Project" pane, in the "Other actions" group, expand "Charter" and select "Use the charter".Another solution to enable the automatic prefixing: on the "Project" pane, in the "Other actions" group, expand "Code style" and select "Use code style".
  • When creating a new project the automatic prefixing is enabled by default.
  • The names of variables containing less than 3 characters are not prefixed.

Dsabling the automatic prefixing

To disable the automatic prefixing:
  • deselect "Project .. Programming charter .. Use the charter".
  • WINDEV Mobile display the "Options" tab of the project description ("Project .. Project description") and uncheck "Automatically prefix the variables and the elements found in the project".
To disable the automatic prefixing, use one of the following methods:
  • on the "Project" pane, in the "Other actions" group, expand "Code style" and deselect "Use code style".
  • WINDEV Mobile in the "Options" tab of the project description, uncheck "Automatically prefix the variables and the elements found in the project".
To disable the automatic prefixing, use one of the following methods:
  • on the "Project" pane, in the "Other actions" group, expand "Charter" and deselect "Use the charter".on the "Project" pane, in the "Other actions" group, expand "Code style" and deselect "Use code style".
  • in the "Options" tab og the project description, uncheck "Automatically prefix the variables and the elements found in the project".
Reminder: To display the project description, go to the "Project" pane, "Project" group, and click on "Description".

Creating a code style

To create a code style:
  1. Display the project description ("Project .. Project description").Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. Display:
    • WINDEV Mobile the "Options" tab.
    Display the "Options" tab.
  3. Click the "Create a programming charter" button and validate the information window that is displayed.Click "Create a code style" and validate the information window displayed.
  4. Select the location of the new code style and enter its name (".CDP" file).
  5. Validate ("Save" button). The new code style is created.
    By default, this charter corresponds to the "Standard" charter (supplied with WINDEV, WEBDEV or WINDEV Mobile).
  6. Click the "Edit" button.
  7. Define the different prefixes and validate.
Note: The "Standard" code style cannot be modified.

Modifying a code style

To modify a code style:
  1. Display the project description ("Project .. Project description").Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. Display:
    • WINDEV Mobile the "Options" tab.
    Display the "Options" tab.
  3. Select the code style to modify.
  4. Click the "Edit the charter" button.Click "Edit style".
  5. Define the new prefixes and validate.
Notes:
  • These modifications will be taken into account when creating new elements or new variables.
  • The "Standard" code style cannot be modified.
  • To edit the current programming charter, you can also select "Project .. Programming charter .. Edit the charter".Another solution to edit the current programming charter: on the "Project" pane, in the "Other actions" group, expand "Charter" and select "Edit the charter".Another solution to edit the current code style: on the "Project" pane, in the "Other actions" group, expand "Code style" and select "Edit code style".

Modifying the code style used

To modify the code style used:
  1. Display the project description ("Project .. Project description").Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. Display:
    • WINDEV Mobile the "Options" tab.
    Display the "Options" tab.
  3. Select the programming charter to use (in the "Programming charter" list or via the "..." button).Select the code style to use (in the "Code style" list or via the "..." button).
  4. Validate.
Note: The same code style (".CDP" file) can be used in several WINDEV, WEBDEV and WINDEV Mobile projects.

Enabling/Disabling the display of prefixes in the code editor

You have the ability to display (or not) the different prefixes in the code editor.
To enable or disable the display of prefixes in the code editor, use one of the following methods:
  • select/deselect "Project .. Programming charter .. Display the prefixes".on the "Project" pane, in the "Other actions" group, expand "Charter" and select/deselect "Display the prefixes".
  • in the description window of the project, check/uncheck "Hide the display of prefixes" in the "Options" or "Advanced" tab.
    Reminder: to display the project description, go to the "Project" pane, "Project" group, and click on "Description".
    in the description window of the project, check/uncheck "Add prefixes automatically" in the "Options" or "Advanced" tab.
    Reminder: to display the project description, go to the "Project" pane, "Project" group, and click on "Description".
  • click .

Add prefixes automatically

It is possible to automatically add prefixes in the different editors when a code style has been defined.
To add prefixes automatically:
  1. Display the project description: on the "Project" pane, in the "Project" group, click "Description".
  2. Display the "Options" tab.
  3. Select "Add prefixes automatically".
  4. Validate.
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment