PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • Overview
  • Principle
  • The different platforms and targets
  • Operating mode
  • How to proceed?
  • How to implement the conditional target-code?
  • Features of the conditional target-code
  • Displaying a target-code
  • Describing a target-code
  • Limits
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 a specific code for each environment (WINDEV, WEBDEV and WINDEV Mobile).
Furthermore, depending on the platform (Windows or Linux) and on the type of generation (Java, PHP, .NET application or Webservice), you can choose different targets for each environment. The term of "platform" is used to distinguish between these types of code.
For example, a print process will not be performed the same way in Windows, in Internet or on a mobile device with an infrared connection.
Versions 21 and later
Note: Depending on the case, a conditional target-code can be replaced by the <COMPILE IF> statement.
New in version 21
Note: Depending on the case, a conditional target-code can be replaced by the <COMPILE IF> statement.
Note: Depending on the case, a conditional target-code can be replaced by the <COMPILE IF> statement.
Principle

The different platforms and targets

The following platforms are available:
  • 32-bit Windows application
  • 64-bit Windows application
  • Java application
  • .Net application
  • 32-bit Linux application
  • WINDEV Mobile
  • WEBDEV Windows
  • WEBDEV Linux
  • WEBDEV PHP
  • Webservice
  • 32-bit Windows service
  • 64-bit Windows service
  • 32-bit Linux Daemon
  • 64-bit Linux Daemon
  • Android application
  • 64-bit Linux application
  • Versions 18 and later
    Windows Store apps application
    New in version 18
    Windows Store apps application
    Windows Store apps application
    Versions 21 and later
    Universal Windows Plateform application
    New in version 21
    Universal Windows Plateform application
    Universal Windows Plateform application
Depending on the process where you are positioned, only some platforms are accessible. For example, no PHP code can be entered in the code of a button found in a WINDEV window.
The platforms are accessible in the following processes:
  • code of the project
  • code of classes
  • code of sets of procedures
  • code of reports (including the code of controls)
The table below presents the platforms that can be accessed according to the current process:
PlatformCode of WINDEV window Code of WINDEV Mobile windowCode of WEBDEV page
32-bit Windows application
x
64-bit Windows application
x
Java application
x
.Net application
x
WINDEV Mobile
x
WEBDEV Windows
x
WEBDEV Linux
x
WEBDEV PHP
x
Note: The "Webservice" platform can only be used in the code of classes and in the code of sets of procedures.

Operating mode

Up to 8 different targets can be found in the same process: your code will be divided into 8 "parallel" sections (vertical division in the code). The code that will be run in the application will depend on the environment, the type of generation and the operating system.
In some cases, the code to run may be identical for several platforms. You have the ability to group several platforms.
Example: when creating a multi-platform "Login" component, the initialization code will differ depending on whether the component is included in a WINDEV project, in a WINDEV Mobile project or in a WEBDEV project.
  • In this case, the code is identical for "Windows application" and for "Java application". This code is entered in the same "target" that groups these two platforms.
  • The code for WINDEV Mobile is using the same function as the first target but it is calling a different window (WINDEV Mobile window).
  • The third target affects "WEBDEV Windows", "WEBDEV Linux" and "WEBDEV PHP". The code is identical for these three platforms.
How to proceed?

How to implement the conditional target-code?

To implement a conditional target-code:
  1. Position in the process into which a target-code must be inserted.
  2. Select "Code .. Conditional Target-Code .. New area".On the "Code" pane, in the "Target code" group, expand "Target code" and select "New area".
  3. The following window is displayed:
  4. Check the products affected by the current code: a target will be created for each environment checked. If you are positioned in the initialization code of the project, you will have:
    • for WINDEV: 1 target with "32-bit WINDEV", "64-bit WINDEV", "Java application", "32-bit Linux application", ".Net application", "Webservice", "32-bit Windows service", "64-bit Windows service", "32-bit Daemon", "64-bit Linux Daemon".
    • for WINDEV Mobile: 1 target with "WINDEV Mobile", "Android application".
    • for WEBDEV: 1 target with "WEBDEV Windows", "WEBDEV Linux" and "WEBDEV PHP".
The "Advanced" button is used to customize the targets by choosing the available platforms:
Reminder: The list of available platforms depends on the current process.
This window allows you to see the different targets and to add or delete targets with the "+" and "-" buttons.
  • To add a platform to a target:
    • select the platforms (multi-selection list) that must be included in the target.
    • select the column corresponding to the target into which the platforms must be added.
    • click the add button .
  • To delete a platform from a target:
    • click the relevant platform.
    • click the delete button .
Features of the conditional target-code

Displaying a target-code

When you are working on one of the targets, you have the ability to display this target on the entire width of the code editor. The other targets are automatically hidden in order to provide an optimal display.
To perform this operation, click the button corresponding to the platform to display (top right of the target-code).
In our example, the code displayed affects the target that groups "WEBDEV Windows", "WEBDEV Linux" and "WEBDEV PHP". Two buttons are available in the target to display the code of targets 1 ("Windows Application" and "Java Application") and 2 (WINDEV Mobile).
For each target, an icon and a caption (displayed in the top left corner) allow you to easily identify the platforms associated with the target.

Describing a target-code

Each target of the target-code includes a button ( at the top left). This button is used to edit the description of the target-code. This allows you to modify the description of the target-code at any time: add a target, modify the platforms of a target, ...
A click performed on this button opens a popup menu:
This popup menu is used to add a code section, to delete a target area, ...
Limits
  • The declaration of global variables cannot be performed in a conditional target-code.
  • The local variables must have unique names for all the process areas.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment