PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Including constants
  • Deploying the application
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
Extern (Reserved word)
In french: Externe
EXTERN is used to:
  • Include a text file containing WLanguage commands in an application (see syntax 1). This feature is only available in the initialization code of the project, in the declaration code of the global variables of a window/page and in the declaration code of a class.
  • Declare an external object (see syntax 2).
  • WEBDEV - Browser code Declare a JavaScript object in WLanguage code.
Versions 16 and later
Universal Windows 10 App This feature is available for the Windows Phone applications.
New in version 16
Universal Windows 10 App This feature is available for the Windows Phone applications.
Universal Windows 10 App This feature is available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This feature is available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This feature is available for the iPhone/iPad applications.
iPhone/iPad This feature is available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
New in version 18
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Universal Windows 10 App This feature is available in Windows Store apps mode.
Android Widget This feature is available in Android Widget mode.
Versions 20 and later
WEBDEV - Browser code The integration of a text file containing WLanguage code is now available in browser code.
New in version 20
WEBDEV - Browser code The integration of a text file containing WLanguage code is now available in browser code.
WEBDEV - Browser code The integration of a text file containing WLanguage code is now available in browser code.
Versions 21 and later
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
New in version 21
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Universal Windows 10 App This feature is available in Universal Windows 10 App mode.
Apple Watch This feature is available in Apple Watch mode.
Example
// Syntax 1
// Include the "WinConst.wl" file that contains the standard Windows constants
EXTERN "WinConst.wl"
WINDEVWindows Mobile
// Syntax 2
EXTERN ExampleWindow
LoadWDL("User1.WDL")
Open(ExampleWindow)
WEBDEV - Browser code
// Allows you to use the javascript Document object in WLanguage code
EXTERN document

pclObject is object dynamic
pclObject = document:getElementById("id_object")
Syntax
WINDEVWEBDEV - Server codeWEBDEV - Browser codeiPhone/iPadApple WatchWindows MobileUniversal Windows 10 App

Including a text file in an application Hide the details

EXTERN <File name>
<File name>: Character string
Name of text file containing the WLanguage code that must be included in an application. This is a standard text file, created by any text editor.
A full path can be specified (for example: "C:\WDProject\MyConst.wl"). If the path is not specified, the file will be sought:
  • in the project directory,
  • in the "Personal\Extern" directory of WINDEV, WEBDEV and WINDEV Mobile.
Including a text file with EXTERN has the same effect than copying a text file in the code editor.

Declaring an external object Hide the details

EXTERN <Name of External Object>
<Name of external object>: Character string (without quotes)
Name of external object (variable, constant, ...) to declare.
EXTERN is used to declare a variable that will exist only when running the application.
WINDEVWINDEV Mobile For example, the EXTERN keyword can be used to handle a window found in an external library (loaded by LoadWDL).
WEBDEV - Browser code EXTERN can be used to handle the JavaScript objects in WLanguage browser code.
Remarks

Including constants

  • Including files is very useful to describe the constants common to several projects or used by the operating system. Use EXTERN to include in the code a file containing the common constants.
  • Including files can only be performed in the following processes:
    • Initialization code of project,
    • Declaration code of global variables of window or page,
    • Declaration code of class.
  • Several files defining the constants are supplied (in the "\Personal\Extern" subdirectory of WINDEV, WEBDEV or WINDEV Mobile):
    • "WinConst.wl": Standard Windows constants.
    • "Limites.wl": Constants corresponding to the limits for the types of WINDEV, WEBDEV and WINDEV Mobile data.
    • "ListeDefinitionHF.wl": HFSQL constants used for the log process (see Files handled by the log process).
    • "Except.wl": Constants used to manage the exceptions.
    • "KeyConst.wl": Standard Windows constants used for the keyboard keys. These constants can be used with KeyPressed in the optional WINDEV processes ("Key down" or "Key up") by using the _EVE.wParam variable.

Deploying the application

When installing the application on the client computer:
  • If the path of the file is specified: The file must be installed in the specified directory.
  • If the path of the file is not specified: By default, the file will be automatically installed in the directory of the project.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment