ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Reflection functions
  • Retrieving the definition
  • Limitations
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
Gets the description of a type identified by name.
Example
PROCÉDURE Proc(ClassName is string)
 
// Gets the definition of the class identified by name
MyDefinition is Définition
MyDefinition = GetTypeDefinition(ClassName)
Description_report is Définition = GetTypeDefinition(RPT_CustomerOrders)
Syntax_description is Syntax Description = Description_report.DeclarationSyntax
// Iterate over the parameters of the report
FOR EACH x OF Syntax_description.Parameter
Trace(x.Name)
END
Syntax
<Result> = GetTypeDefinition(<Element name>)
<Result>: Definition
Definition variable.
<Element name>: Character string
  • Name of the class or structure for which the definition should be retrieved.
  • Name of the window, page or report for which the definition should be retrieved.
Remarks

Retrieving the definition

If the class or structure is unknown, GetTypeDefinition returns a Null definition with a non-fatal error ("Invalid definition").
If the element is not allocated, GetTypeDefinition returns a Null definition with a non-fatal error ("Element not allocated").
The error cases can be processed:
  • by comparing the description to Null.
  • by checking the value of the ErrorOccurred variable.

Limitations

  • In a project, you cannot retrieve the definition of a class or structure coming from:
    • an external component.
    • an internal component.
  • In an external component, you cannot retrieve the definition of a class or structure coming from the host project.
Component: wd300vm.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/10/2023

Send a report | Local help