PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Overview
  • Creating an internal component
  • Steps to follow
  • Internal component and analysis: total autonomy
  • Sharing internal components (via SCM)
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
11. Internal components in practice
Previous pageTable of contentsNext page
Overview
An internal component is a set of elements from a project. This set is used to:
  • Organize a project: You can create internal components to group the elements of a project, by functionality, for example.
  • Share elements between multiple projects: The elements in an internal component can be shared between multiple projects via the SCM.
One of the advantages of an internal component compared to an external component is that it can be debugged directly from the project that uses it.
Difference with an external component: An internal component allows you to include all its elements in the interface of the project. All the "public" elements of the internal component can be handled directly in the editor.
When using an external component, the "public" elements of the component cannot be handled directly. To modify the external component, you need to open the corresponding project.
Creating an internal component

Steps to follow

To create an internal component:
  1. On the "Project" tab, in the "Project configuration" group, expand "New configuration" and select "Internal component". The internal component creation wizard starts.
  2. Specify the characteristics of the internal component:
    • its name. The name of the internal component will be used for the WCI file that corresponds to the description of the internal component. This name will also be used to create a subdirectory in your project with all the elements of the internal component.
    • its caption.
    • its description.
  3. Select the elements that will be included in the internal component. An internal component can contain all types of elements from a project: windows, reports, templates, sets of procedures, etc.
  4. Specify the elements of the internal component that will be directly accessible in the code and in the preset actions of the project hosting the internal component.
    Remark: The automatic completion will display accessible (or "public") elements. They can be used by the elements of the project or from another internal component. Inaccessible (or "private") elements can only be used by another element of the internal component (the automatic completion will display "private" elements only from the elements of an internal component).
  5. Specify how the data and execution contexts are managed. There are three modes to manage data and execution contexts:
    • Use the project analysis or no analysis (full share): The internal component accesses the data files of the project. The internal component and the project use the same execution contexts.
      This is the default mode if the internal component does not use an analysis.
    • Use the project analysis with different execution contexts (advanced mode): The internal component accesses the data files of the project. The internal component and the project use different execution contexts.
      This mode is reserved to specific cases.
    • Use a specific analysis: The internal component accesses its own data files. The internal component and the project use different execution contexts.
      This is the default mode if the component uses an analysis.
      In this case, the analysis used by the internal component must be specified. You can also create a new analysis directly. This analysis will be associated with the internal component.
  6. Validate the new internal component. At any moment, you can:
    • Change the characteristics of the internal component via its description window.
    • Handle the internal component and its elements.
Tip: An internal component contains no code for declaring the global variables. A set of procedures can be used to initialize the internal component.

Internal component and analysis: total autonomy

An internal component can be linked to its own analysis. In this case, the project that hosts the internal component can have multiple analyses:
  • the analysis of the project.
  • the analysis of the internal component(s). This analysis is defined when creating the internal component. It can also be selected from the internal component description window.
The elements generated by the RAD for the internal component will be saved in the internal component directory. If changes are made to the analysis of the internal component, the RAD will prompt you to generate the elements these changes applied to.
Sharing internal components (via SCM)
The internal components can be shared between multiple projects via the SCM.
To share an internal component via the SCM, the project containing the internal component must be in the SCM. You can:
  • create the internal component from a project located in the SCM. The internal component will be automatically saved in the SCM.
  • import a project containing one or more internal components into the SCM. The internal components will be automatically included in the SCM.
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment