PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Retrieving the definition
  • Limits
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
Retrieves the definition of element type.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 21 and later
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Apple Watch This function is now available in Apple Watch mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
PROCÉDURE Proc(x)
// Récupère la définition du type de x
MaDéfinition is Définition
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).
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 Définition
 
po = new ClasseBase
d = GetDefinition(po)
Trace(d.Name)
 
po = new ClasseDérivée
d = GetDefinition(po)
Trace(d.Name)
If the type of the element is not maintained, the GetDefinition function returns an Definition Null with the non-fatal error "Definition invalid".
If the element is not allocated, the GetDefinition function returns an Definition Null with the non-fatal "element not allocated" error.
The error cases can be processed:
  • by comparing the description to Null.
  • by checking the value of the ErrorOccurred variable.
The following types of elements are supported:
  • the variables and the members of native type
  • the variables and the members of advanced type
  • the variables and the members of class type
  • the variables and the members of structure type
The following types of elements are not supported:
  • the variables and the members of .NET type
  • the windows, reports, pages, controls, ...
  • the HFSQL files, the queries, the items, ...

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: wd270vm.dll
Minimum version required
  • Version 16
This page is also available for…
Comments
Click [Add] to post a comment