ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / Reflection functions
  • Retrieving the definition
  • Limitations
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Gets the description of a type identified by name.
Example
PROCEDURE Proc(ClassName is string)

// Gets the definition of the class identified by name
MyDefinition is Definition
MyDefinition = GetTypeDefinition(ClassName)
Description_report is Definition = 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: 09/19/2024

Send a report | Local help