ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage syntax / WLanguage procedures
  • Overview
  • Sets of procedures
  • WEBDEV project
  • Events of the sets of procedures
  • Handling the sets of procedures
  • Creating a set of procedures
  • Importing a set of procedures
  • Overriding procedures
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
The global procedures are grouped in sets of procedures.
A set of procedures is used to:
  • Share the global procedures between several projects.
  • Divide global procedures between several developers, for the same project. In this case, the management of global procedures is simplified. You can for example:
    • lock this set only when modifications are made to a global procedure.
    • modify one or more global procedures even if the project is currently modified by another user.
The sets of procedures found in a WINDEV project or in a WINDEV Mobile project can be shared with a WEBDEV project.
Caution: Only the code compatible with WEBDEV must be used in the shared set of procedures.
Sets of procedures
WEBDEV - Server codeWEBDEV - Browser code

WEBDEV project

In a WEBDEV project corresponding to a dynamic site, two types of sets of procedures can be found:
  • a set of server procedures (".WDG" file)
  • a set of browser procedures (".WWN" file)
Remark: A set of global browser procedures is converted into a set of JavaScript procedures. This set of Javascript procedures is saved in the "<Project Name>_WEB" directory and it is named "<Set Name>.JS".
Limit: The global server procedures cannot call the global browser procedures (and conversely).

Events of the sets of procedures

The sets of procedures have a "Declarations" event and an "Ending" event.
Like any window or project, the sets of procedures can own:
  • Their own global variables.
  • Their own constants.
  • Their own declaration event of global variables.
  • Their own ending event.
To access a global variable in a set of procedures from the project, the name of the variable must be prefixed with the name of the set of procedures. For example:
MySet.MyVariable
WEBDEV - Browser code The "Declaration" event is used to declare variables that can be used in all the global browser procedures (useful when handling external objects (Mashup)).
Handling the sets of procedures

Creating a set of procedures

A set of procedures can be created from the "Project explorer" pane.
To create a set of procedures from the project explorer:
  1. Select "Procedures" in the project explorer.
  2. Select "New set of procedures" in the context menu.
    WEBDEV - Browser code The "New set of browser procedures" option is used to create a set of browser procedures.
  3. Specify the name of the set of procedures and validate.

Importing a set of procedures

A set of procedures can be imported into a project. The procedures found in this imported set can then be used in your project.
A set of procedures can be imported from the "Project explorer" pane.
To import a set of procedures from the project explorer:
  1. Select "Procedures" in the project explorer.
  2. Select "Import a set of procedures" in the context menu.
    WEBDEV - Browser code The "Import a set of browser procedures" option is used to import a set of browser procedures.
  3. Specify the name and path of the set of procedures to import and validate.

Overriding procedures

Two procedures with the same name can be defined in different sets of procedures used by the same project.
To access one of these procedures, the name of the procedure must be prefixed by the name of the set of procedures to use.
For example, to use the Display procedure found in the set of procedures named Screen, you must write: Screen.Display().
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help