ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Component / Internal component
  • Overview
  • Creating an internal component
  • Creating an internal component
  • Internal component: operations performed when created
  • Internal component and analysis: total autonomy
  • RAD and internal components with analysis
  • Notes and limitations
  • Installing an application that uses internal components
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
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. For more details, see Sharing an internal component.
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.
For more details, see External components.
Creating an internal component

Creating an internal component

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. For Android and iOS, right-click "Internal components" in the project explorer, and then select "New internal component".
  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. Go to the next step.
  4. Select the elements that will be included in the internal component. An internal component can contain all types of elements from a project: windows, pages, reports, templates, sets of procedures, etc, ...
    Remark: If the elements in the internal component contain links to the elements in the project or in another internal component, a compilation error will indicate that a project element cannot be accessed from an internal component.
  5. Go to the next step.
  6. 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).
  7. Go to the next step.
  8. Specify the analysis used by the internal component. Three modes are available:
    • 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: it is stand-alone. 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 and its password (if any) must be specified. You can also create a new analysis directly. This analysis will be associated with the internal component.
  9. Go to the next step.
  10. Validate the new internal component. At any moment, you can:
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: operations performed when created

When creating an internal component, the following operations are performed:
  • A subdirectory with the name of the internal component is created in the project.
  • The different elements of the internal component are included in the directory of the internal component. The files corresponding to the project elements are physically moved.
  • A WCI file is created in the directory of the internal component. This file contains the list of the component elements.
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:

RAD and internal components with analysis

If a project is associated with multiple analyses, when creating windows or pages via the RAD methodology, you will be able to select the data files linked to the project analysis or to the analysis of the internal components.
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.
Caution:
If the RAD was generated on the project then on an internal component, the templates and the dependencies will not be automatically moved into the directory of the internal component. UI errors may occur. The operations must be performed manually.
Notes and limitations
  • Internal components can be shared via the SCM only. For more details, see Sharing internal components.
  • A project element cannot be in multiple internal components. A set of procedures cannot be shared between several internal components.
  • Internal components cannot be nested.
  • Managing names of elements: The names of the project elements and its internal components must be unique: you cannot use an internal component containing an element whose name is already used in the project. If a conflict occurs when updating an internal component, one of the two elements with the same name must be renamed.
  • Managing styles: If an internal component uses specific styles, only the project that owns these styles will be able to modify them. In the other projects, the styles will not be lost but they cannot be modified.
  • Reports in internal components must not be opened with "Reports & Queries".
  • .NET assemblies cannot be included in internal components.
  • If you want to organize the elements of an internal component, you can create custom-folders in the internal component. For more details, see Custom-Folders.
  • The scope of the functions of a SOAP web service imported into an internal component is limited to the events/processes of the elements included in the internal component. The functions of a web service imported into an internal component will not be accessible in the events/processes of the host project.
Installing an application that uses internal components
Internal components have no effect on the operations used to deploy an application or a site. All the elements in the project (whether or not they are internal components) are taken into account when creating the executable and the setup program.
Related Examples:
WD Timeline Training (WINDEV): WD Timeline
[ + ] This example proposes an internal component used to handle a 'Timeline' control template.
A timeline is used to linearly display a series of events that occurred over a given period of time.
The TPLC_TIMELINE and TPLC_TIMELINE_DOUBLE control templates are used to manage and display a timeline of events.
WD Drawing on Chart Training (WINDEV): WD Drawing on Chart
[ + ] This example is based on an internal component used to draw elements on a chart control:
- Min/Max areas
- Various areas
- Flags
- Plots and trackers
...
WD DirectX Training (WINDEV): WD DirectX
[ + ] DirectX is a set of libraries (or APIs) intended for programming multimedia applications.
This example includes an internal component allowing you to use DirectX 9.0 in your WINDEV applications.
All the APIs and interfaces of DirectX 9 have been implemented.
WD BGInfo Sample components (WINDEV): WD BGInfo
[ + ] This example explains how to write information on the background screen of a computer (IP address, name of the computer, today's date, etc.).
This feature can be easily included in an existing application by using the internal component found in this example.
WD WindowsUpdate Training (WINDEV): WD WindowsUpdate
[ + ] This example explains how to manage the updates available on Windows Update. It provides an internal component allowing to download the updates and to install them.
You also have the ability to retrieve some specific information about the updates (minimum disk space required, importance level, etc..)
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 11/21/2023

Send a report | Local help