ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage functions / Standard functions / Reflection functions
  • Retrieving the definition
  • Error management
  • Managed and unmanaged items
  • Limits
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Retrieves the definition of element type.
Example
PROCEDURE Proc(x)
// Récupère la définition du type de x
MaDéfinition is Definition
MaDéfinition = GetDefinition(x)
Syntax
<Result> = GetDefinition(<Element>)
<Result>: Definition
Definition variable.
<Element>: Variable or class member
Element for which the definition will be retrieved.
Remarks

Retrieving the definition

GetDefinition is used to retrieve the definition of content type (and not the definition of variable type).
New in version 2025
To retrieve the variable type definition, use GetVariableDefinition.
Example:
If two classes "DerivedClasse" and "BaseClass" derive from each other. If the instances of "DerivedClass" and "BaseClass" are handled by a "dynamic BaseClass" variable, GetDefinition returns the definition of real class of instance.
po is ClasseBase dynamic
d is Definition
po = new ClasseBase
d = GetDefinition(po)		// renvoie la définition de ClasseBase
d = GetVariableDefinition(po)	// renvoie la définition de ClasseBase

po = new ClasseDérivée
d = GetDefinition(po)		// renvoie la définition de ClasseDérivée
d = GetVariableDefinition(po)	// renvoie la définition de ClasseBase

Error management

If the type of the element is not supported, GetDefinition returns a Null definition with a non-fatal error ("Invalid definition").
If the element is not allocated, the function GetDefinition function returns a Null definition with the non-fatal error "Element not allocated".
The error cases can be processed:
  • by comparing the description to Null.
  • or by testing the value of variable ErrorOccurred.

Managed and unmanaged items

The following types of elements are supported:
  • native variables and members
  • advanced variables and members
  • variables and members of type class
  • variables and members of type structure
The following types of elements are not supported:
  • variables and members of .NET type
  • windows, reports, pages, controls, etc.
  • HFSQL data files, queries, fields, etc.

Limits

  • In a project, you cannot retrieve the definition of an instance coming from:
    • an external component.
    • an internal component.
  • In an external component, you cannot retrieve the definition of an instance 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: 05/14/2025

Send a report | Local help