PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • 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/iPadApple WatchUniversal Windows 10 AppWindows Mobile
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 the element is accessible, the component user will see this element in the list of project elements. The user of the component will be able to handle this element by programming (like any other project element).
    Note: However, the code of this element is not visible.
  • If the element is not accessible, the user will not even know that this element exists.
Caution: depending on the declaration mode of the 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 is using 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 is using the component.

If these procedures are public in the component, these procedures will be public in the project that is using 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 is using the component.

If the procedure is public in the component, the procedure will be public in the project that is using 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 initialization code of the project and the closing code of the project 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.
Note: By default, the component elements are using 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.
  • in the component, create a procedure used to initialize these global variables.
  • 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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment