PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • How to proceed?
  • Manager of code bricks
  • Creating a code brick
  • Using the code bricks
  • Sharing code bricks
  • Retrieving the data from a custom glossary
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
Overview
The code editor allows you to enter "Code bricks". These "Code bricks" are sections of code that are frequently used. You have the ability to create all your code bricks: they will always be available to help you save time.
These code bricks can contain parameters: the name of the data file, the name of the search item or the name of the window can be passed in parameter to your code brick. When it is used, the code editor will ask you to enter the necessary parameters: no risk of error!
The code bricks can be easily moved from a project to another one, from a computer to another one, ...
Each code brick is associated with a keyword that simplifies the search.
Versions 16 and later
The management of code bricks is common to the management of the glossary found in the earlier versions.
New in version 16
The management of code bricks is common to the management of the glossary found in the earlier versions.
The management of code bricks is common to the management of the glossary found in the earlier versions.
How to proceed?

Manager of code bricks

The code editor proposes a manager of code bricks. This manager is used to:
  • Add a code brick.
  • Modify a code brick.
  • Use a code brick.
  • Delete a code brick.
Versions 16 and later
  • Manage the glossary elements.
New in version 16
  • Manage the glossary elements.
  • Manage the glossary elements.
This manager is displayed like a pane:
  • via "Code .. Code bricks .. Manager of code bricks" (available in the code editor)
  • via "Code .. Code bricks .. Display the code bricks" (available in the code editor)
  • via "Code bricks .. Manager of code bricks" from the popup menu of the code editor.
  • via "Code bricks .. Display the code bricks" from the popup menu of the code editor.
To display this manager:
  • In the code editor, select "Code bricks .. Display all the code bricks" from the popup menu.
  • On the "Home" pane, in the "Environment" group, expand "Panes" and select "Code bricks".
Versions 16 and later
Note: The manager of code bricks is empty by default. If custom code bricks were defined in the earlier versions, these code bricks are automatically imported. To display the standard elements (which means the shortcuts proposed by default on the WLanguage functions), select "Display the standard bricks" of the arrow button.
New in version 16
Note: The manager of code bricks is empty by default. If custom code bricks were defined in the earlier versions, these code bricks are automatically imported. To display the standard elements (which means the shortcuts proposed by default on the WLanguage functions), select "Display the standard bricks" of the arrow button.
Note: The manager of code bricks is empty by default. If custom code bricks were defined in the earlier versions, these code bricks are automatically imported. To display the standard elements (which means the shortcuts proposed by default on the WLanguage functions), select "Display the standard bricks" of the arrow button.

Creating a code brick

A code brick can be created:
  • from the manager of code bricks. To do so, click the "+" button and enter the requested information.
  • from the code editor. To do so, select the code corresponding to the code brick and perform a Drag and Drop toward the manager of code bricks. The description window of the code brick is displayed, with the requested information. If the first code line corresponds to a comment, this comment automatically becomes the title of the code brick.
The description window of a code brick contains the following elements:
  1. Title of the code brick. This title is displayed in the manager of code bricks.
  2. Abbreviation associated with the code brick. This abbreviation can be a word or a set of words. This abbreviation simplifies the use of the code brick: all you have to do is enter the abbreviation in the code editor and press F5: the corresponding code brick is automatically inserted.
  3. Code corresponding to the code brick.
  4. Button used to insert the automatic controls. The following information can be inserted:
    • the date and time when the brick was inserted into the code (to the format defined in the language parameters of Windows)
    • automatic insertion of the selected code: in this case, when the code brick is "dropped" from the code manager to the code editor, the code currently selected in the code editor is inserted at the specified location. This option is useful for a code brick that is used to perform an iterative process (loop, ...).
    • login of the user who inserts the code brick
    • parameter: this option is used to replace the code selected in the code brick by §<Parameter Name>§. <Parameter Name> can be replaced by the requested name. If the code brick contains this option, a window for entering the parameters will be automatically displayed when using the code brick.
    • parameter with default value: this option is used to replace the code selected in the code brick by §<Parameter Name>=<Value>§. <Parameter Name> can be replaced by the requested name and <Value> by the default value of the parameter. If the code brick contains this option, a window for entering the parameters will be automatically displayed when using the code brick.
    • cursor position: this option allows you to define the position of te cursor once the code brick has been used. The cursor can be positioned in the code section to type for example.
Location of code bricks:
By default, the added code bricks are stored in the "Personal\Code bricks" sub-directory of the setup directory of the product used. This directory can be modified in the options of WINDEV, WEBDEV or WINDEV Mobile ("Tools .. Options of WINDEV/WEBDEV/WINDEV Mobile", "Directories" tab).By default, the added code bricks are stored in the "Personal\Code bricks" sub-directory of the setup directory of the product used. This directory can be modified in the options of WINDEV, WEBDEV or WINDEV Mobile:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "General options of WINDEV/WEBDEV/WINDEV Mobile".
  2. Display the "Directories" tab and modify the directory of code bricks.
Versions 16 and later
Note: The manager of code bricks is used to manage all the abbreviations of the code editor. Each abbreviation allows you to access a function, a procedure, a property or a set of code lines. The manager of code bricks includes the glossary found in the earlier versions. You have the ability to create a code brick corresponding to a name of WLanguage function.
New in version 16
Note: The manager of code bricks is used to manage all the abbreviations of the code editor. Each abbreviation allows you to access a function, a procedure, a property or a set of code lines. The manager of code bricks includes the glossary found in the earlier versions. You have the ability to create a code brick corresponding to a name of WLanguage function.
Note: The manager of code bricks is used to manage all the abbreviations of the code editor. Each abbreviation allows you to access a function, a procedure, a property or a set of code lines. The manager of code bricks includes the glossary found in the earlier versions. You have the ability to create a code brick corresponding to a name of WLanguage function.

Using the code bricks

Several methods allow you to use the code bricks:
  • Drag and Drop from the manager of code bricks.
  • Using the [F5] key on the keyword associated with the code brick.
Notes:
  • Versions 16 and later
    When typing the shortcut corresponding to a code brick, the assisted input proposes the corresponding code brick. All you have to do is select it and validate to include it in the current code.
    New in version 16
    When typing the shortcut corresponding to a code brick, the assisted input proposes the corresponding code brick. All you have to do is select it and validate to include it in the current code.
    When typing the shortcut corresponding to a code brick, the assisted input proposes the corresponding code brick. All you have to do is select it and validate to include it in the current code.
  • The "Code brick" option (popup menu of the code editor) returns the list of the last ten code bricks, allowing you to use them directly.

Sharing code bricks

You want to share your code bricks between developers or between WINDEV, WEBDEV et WINDEV Mobile?
All you have to do is configure the directory of code bricks in the options of the product used ("Tools .. Options .. General options of WINDEV/WEBDEV/WINDEV Mobile", "Directories" tab).All you have to do is configure the directory of code bricks in the options of the product used:
  1. On the "Home" pane, in the "Environment" group, expand "Options" and select "General options of WINDEV/WEBDEV/WINDEV Mobile".
  2. Display the "Directories" tab and modify the directory of code bricks.
Versions 16 and later

Retrieving the data from a custom glossary

If your glossary was customized in an earlier version, you have the ability to retrieve this data:
  1. Select "Import a glossary" of the arrow button.
  2. Select the "WX_Gloss.fic" file found in the "Custom" sub-directory of the product used. The file is automatically imported.
New in version 16

Retrieving the data from a custom glossary

If your glossary was customized in an earlier version, you have the ability to retrieve this data:
  1. Select "Import a glossary" of the arrow button.
  2. Select the "WX_Gloss.fic" file found in the "Custom" sub-directory of the product used. The file is automatically imported.

Retrieving the data from a custom glossary

If your glossary was customized in an earlier version, you have the ability to retrieve this data:
  1. Select "Import a glossary" of the arrow button.
  2. Select the "WX_Gloss.fic" file found in the "Custom" sub-directory of the product used. The file is automatically imported.
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment