PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • The different parts of the pattern description
  • 1. The characteristics of the pattern reused in the wizard:
  • 2. Project code
  • 3. Code of the window
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 MDL file is the file used to generate a RAD window. This file contains the entire description of the pattern to generate. This description is made of two distinct parts:
  • the description of the pattern,
  • the description of the window.
This help page only presents the code used to describe the pattern. To present this code in details, the script of a Form.mdl pattern is used.
Caution: In version 12, the RAD was entirely rebuilt. The MDL files are kept for backward compatibility. See New RAD patterns for more details.
The different parts of the pattern description

1. The characteristics of the pattern reused in the wizard:

[Pattern]
#############################
# name of the pattern
#############################
Name=Form with browse
Title=Form
Number=2
#############################
# description of the pattern
#############################
Description=Beginning
Form pattern with browse buttons.
Used to enter, modify and delete records.
Used to view records.
Description=End
#############################
# classes for OOP
#############################
Class=CWDHandleFile
Class=CWDForm
#############################
# group of files
#############################
GPFile=A
#accepts the queries
Query=Yes
#############################
# group of controls
#############################
ControlGroup=GP_CONTROL
BrowseGroup=GP_BROWSE
Group=GP_BROWSE
Group=GP_MODIF
LinkGroup=GP_LINK
Group=GP_APPLY
The different elements used in this code are as follows:
[Modele]Signals the beginning of section for pattern description
NameName of the pattern, displayed in the wizard for window creation.
TitleTitle of the generated window
NumberNumber of the RAD pattern. Eleven RAD patterns are available by default
Description = BeginningBeginning of description of the pattern features. These features will be displayed in the wizard for window creation
Description = EndEnd of description of the pattern features.
ClassThe window can be created in OOP mode. The corresponding option will be visible in the wizard.
Name of the classes found in the \pattern\RAD directory that must be copied to the project directory in order for the window to operate properly.
GPFile=AIndicates that a single type of file must be chosen in the wizard.
The GpFile=A(N1)B notation indicates that two files must be selected in the wizard. These two files must be linked in the analysis by a 1-n link.
Query=YesIndicates that, for this RAD pattern, the wizard can propose both files defined in the analysis and queries created in the query editor.
If the queries must not be used, specify Query=No
ControlGroup=GP_CONTROL
BrowseGroup=GP_BROWSE
Group=GP_BROWSE
Group=GP_MODIF
LinkGroup=GP_LINK
Group=GP_APPLY
Defines the names of the different groups of controls to create.
ControlGroup: group for the edit controls in the window
BrowseGroup: group for the controls visible in browse mode
Group: group of controls
LinkGroup: group for the link buttons

2. Project code

WinCode=Beginning
%define PCODEPRJ OpenPrj
%ifdef FILE
@// Create the files
IF NOT HCreationIfNotFound({RAD_FILE_A}) THEN Info("Unable to create
or to initialize the access to {RAD_FILE_A}",HErrorInfo())
@
%endif
%enddef PCODEPRJ
The different elements used in this code are as follows:
WinCode=BeginningSignals the beginning of code section for the window. The end of the code is marked by WinCode=End
%defineSignals the beginning of a code area definition. The end of this definition is marked by the %enddef keyword
%ifdefSignals the beginning of a conditional code. The entire statement is as follows:
%ifdef .... %else %endif
PCODEPRJDefines the type of statement currently described:
  • LOCPROC: Description of a local procedure
  • GLOBPROC: Description of a global procedure
  • PCODE: Description of a specific process
  • PCODEPRJ: Description of a process associated with the project
OpenPrjType of process currently described
  • "Opening": Declaration code of the global variables of the window
  • "EndInitialization": Code for opening the window
  • "Closing": Closing code of window
  • "Modification": Code whenever the window is modified
  • "OpenPrj": Initialization code of project
  • "ClosePrj": Closing code of project
  • "Initialization": Initialization code of a button
  • "Click": Click code on a button
  • "LineEntry": Code for entering a table row
  • "LineSelection": Code for selecting a table row
FILEUsed to find out whether a file was selected by the user in the wizard for window creation.
QUERY: used to find out whether a query was selected by the user in the wizard for window creation.
@Marks the beginning and the end of code to insert into the specified process when generating the window.
{RAD_FILE_A}Tag used to identify the file selected by the user in the wizard. A identifies the first file, B the second one, ... This tag is automatically replaced in the code generated by the name of the file.
The other tags used are:
  • RAD_FILE_: file variable
  • Form_: Form window variable
  • RAD_KEY_: key variable
  • RAD_SOURCE_KEY: Name of the item before it is used in the query (before the alias)
  • RAD_KEY_CONTROL_: Control associated with the key
  • RAD_WINDOW: window variable
  • RAD_LINKKEY: link key between 2 windows
  • RAD_SOURCE_LINKKEY: Name of link key item before it is used in the query (before the alias)
  • RAD_ORIGIN_LINKKEY: Name of the link key item in the current file (not in the linked file)
  • RAD_ORIGIN_SOURCE_LINKKEY: Name of link key item in the current file before it is used in the query (before the alias)
  • RAD_LINKKEY_CONTROL: Control associated with the link key between 2 windows
  • RAD_REPORT: report variable
  • RAD_VISION_COMBOBOX: variable containing the name of the auto-filled combo box
  • RAD_VISION_FILE: variable containing the name of the file for the Vision+ buttons
  • RAD_VISION_KEY: variable containing the name of the key for the Vision+ buttons
  • RAD_VISION_WINDOW: variable containing the name of the Vision+ window to open
  • Report_Form_: variable containing the name of a form report
  • Report_Table_: variable containing the name of a table report
  • RAD_ITEM_: item variable
  • RAD_LAST_ITEM_: variable containing the name of the last file item
  • RAD_QRY_SELECT_: variable containing the name of a Select query
  • QUOTE_: prefix for the variables that must be necessarily enclosed in quotes
  • NOQUOTE_: prefix for the variables that must not be necessarily enclosed in quotes
%endifSignals the end of a conditional loop
%enddefSignals the end of a code definition

3. Code of the window

%define PCODE Open
%ifdef PROC
....
@
%else
%ifdef SQL
@
...
@
%endif
%endif
The different elements used in this code are as follows:
PROCUsed to find out whether the procedural programming mode was chosen by the user
SQLUsed to find out whether the SQL programming mode was chosen by the user
ODBCUsed to find out whether the ODBC programming mode was chosen by the user
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment