Loads an external component independent of the current project. The component is loaded in a variable of type
Component. This makes it possible to get a global
interface that can be used in the component.
Remark: When the component is loaded, the following WLanguage events are executed:
- Declaration of the classes of the external component.
- Declaration of the sets of procedures of the external component.
- Initialization of the external component.
// Load a component
compo is Component
IF compo.Load(fExeDir() + fSep() + "ComponentExample.wdk") THEN
Trace("OK")
// Execution of the component procedures
Trace(ComponentExecute("GlobalProcedures.Test"))
Trace(ComponentExecute("GlobalProcedures.TestWithParameters", (1)))
END
Syntax
<Result> = <Component>.Load(<Component name>)
<Result>: Boolean
- True if the component has been loaded,
- False otherwise.
<Component>: Component variable
Name of the Component variable in which the component is to be loaded.
<Component name>: Character string
Full path and physical name of the external component to be loaded (WDK file).
Remarks
Loading an external component independent of the project
<Component>.Load does not cause fatal errors. The function returns False in the following cases:
- the component is not found.
- the loaded component is being replaced with another component.
Business / UI classification: Neutral code