|
|
|
|
|
- Retrieving a definition
- Error handling
- Supported and unsupported elements
- Limitations
GetDefinition (Function) In french: RécupèreDéfinition Retrieves the element type definition. PROCEDURE Proc(x)
MyDefinition is Definition
MyDefinition = 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 a definition GetDefinition retrieves the content type definition (not the variable type definition). Example: Two classes, "DerivedClass" 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 dynamic BaseClass
d is Definition
po = new BaseClass
d = GetDefinition(po)
d = GetVariableDefinition(po)
po = new DerivedClass
d = GetDefinition(po)
d = GetVariableDefinition(po)
Error handling 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, GetDefinition returns a Null definition with a non-fatal error ("Element not allocated"). Error cases can be processed: - by comparing the description to Null.
- by checking the value of the ErrorOccurred variable.
Supported and unsupported elements The following types of elements are supported: - native variables and members
- advanced variables and members
- class variables and members
- structure variables and members
The following types of elements are not supported: - .NET variables and members
- windows, reports, pages, controls, etc.
- HFSQL data files, queries, items, etc.
Limitations - 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|