WINDEV Concepts

70 Part 2: Development environment Internal components in practice 1 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. 2 Creating an internal component 2.1 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.

RkJQdWJsaXNoZXIy NDQ0OA==