ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Component / External component
  • Overview
  • Summary table about the elements and the visibility options
  • How to use a global variable from a component
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
Visibility of the elements found in an external component
Overview
When creating an external component, you have he ability to define the elements of the external component that will be accessible (or not) by the user of the component.
  • If an element is accessible, the user will see it in the list of project elements. The user will be able to handle this element programmatically (like any other element created in the project).
    Remark: The code of this element is not visible.
  • If the element is not accessible, the user will not even know that it exists.
Caution: depending on the declaration mode of project elements (class, set of procedures, ...), the accessible elements may change. The table below presents the different methods for accessing an element according to its declaration mode.
Summary table about the elements and the visibility options
ElementNot accessibleAccessible
ClassNo access to the class, to its members or to its methodsThe syntax used to access the class, its members or its methods must comply with the OOP syntax of WINDEV.
If the member or the method is public (default case) in the component, the member or the method will be public in the project that uses the component.

If the member or the method is protected in the component, the member or the method will be protected in the project that uses the component.

If the member or the method is private in the component, the member or the method will be private in the project that is using the component.
WindowNo access to the windowThe global variables of the window cannot be handled. If these variables must be handled, procedures used to read or modify the global variables of the window must be included in the component.
If these procedures have no access attribute in the component, these procedures will be invisible in the project that uses the component.

If these procedures are public in the component, these procedures will be public in the project that uses the component.

If these procedures are private in the component, these procedures will not be accessible in the project that is using the component.
Set of proceduresNo access to the proceduresThe global variables of the set of procedures cannot be handled. If these variables must be handled, procedures used to read or modify the global variables of the set of procedures must be included in the component.
If the procedure has no access attribute in the component, this procedure is invisible in the project that uses the component.

If the procedure is public in the component, the procedure will be public in the project that uses the component.

If the procedure is private in the component, the procedure will not be accessible in the project that is using the component.
Project (WDP, WWP or WPP file)The project can be included (or not) in the component. No visibility option can be defined. The project will always be invisible.

If the project is included in the component, the project initialization code and the project closing code will be automatically run when loading/unloading the component.

Caution: if the analysis included in the component is password-protected, the project must be included in the component in order to specify this password.
AnalysisThe analysis can be included (or not) in the component. No visibility option can be defined. The analysis will always be invisible.

Caution: if an analysis is included in the component and if a password was defined for this analysis, the project must be included in the component.
QueryThe queries can be included (or not) in the component. No visibility option can be defined. The queries will always be visible.

Remark: By default, the elements of a component use an independent HFSQL context.

How to use a global variable from a component

Since the purpose of a component is to be stand-alone, no global variable of the project should be used from this one.
However, the recommended method is as follows:
  • create a global variable in the component.
  • create a procedure in the component to initialize this global variable.
  • from the initialization code of the project and whenever the value of the global variables of the project is modified, call this procedure to assign a similar value to the global variables of the component.
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 10/27/2022

Send a report | Local help