PC SOFT

WINDEV的在线文档

  • Overview
  • Create an internal component
  • Create an internal component
  • Internal component: the modifications performed during the creation
  • Internal component and analysis: case of total autonomy
  • RAD and internal components with analysis
  • Notes and limits
  • Installing an application that uses internal components
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
An internal component is used to group several project elements. This grouping is used to:
  • Organize a project: the internal components can be used to group the project elements by feature for example.
  • Share the elements among several projects: The elements found in an internal component can be shared between several projects via the SCM. See Sharing an internal component for more details.
One of the benefits of the internal component compared to an external component is that the internal component can be debugged from the project that is using it.

Difference with an external component:

  • An internal component enables you to include all the component elements in the interface of the project containing the internal component. All the "public" elements of the internal component can be handled in the editor directly.
  • When using an external component, the "public" elements of the component cannot be handled directly. To modify the external component, the corresponding project must be opened.
See External components for more details.

Create an internal component

Create an internal component

To create an internal component:
  1. Select "Workshop .. Internal component .. Create an internal component". The wizard for creating an internal component starts.On the "项目" pane, in the "项目配置" group, expand "新建配置" and select "Internal component". The wizard for creating an internal component starts.
  2. Specify the characteristics of the internal component:
    • its name. The name of the internal component will be used for the WCI file corresponding to the description of the internal component. This name will also be used to create a sub-directory in your project containing all the elements of the internal component.
    • its caption.
    • its description.
  3. Go to the next step.
  4. Indicate the elements that must be included in the internal component. An internal component can contain all the types of elements found in a project: windows, pages, reports, templates, sets of procedures, ...
    Note: If the elements included in the internal component contain links to the elements found 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 that hosts the internal component.
    Note: The accessible elements (or "public" elements) will be automatically proposed by the completion. They can be used by the elements found in the project or from another internal component. The inaccessible elements (or "private" elements) can only be used by another element of the internal component (the completion will propose these "private" elements only from the elements of an internal component).
  7. Go to the next step.
  8. Specify the management mode of data and runtime contexts. Three modes are available to manage the data and the runtime contexts: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 runtime contexts.
      This mode corresponds to the default mode if the component is using no analysis.
    • Use the project analysis with different runtime context (advanced mode): The internal component accesses the data files of the project. The internal component and the project are using different runtime 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 are using different runtime contexts.
      This mode corresponds to the default mode if the component uses an analysis.
      In this case, the analysis used by the internal component must be specified as well as its password if necessary. You also have the ability to create a new analysis directly. This analysis will be associated with the internal component.
  9. Go to the next step.
  10. Validate the creation of the internal component. You have the ability to:
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: the modifications performed during the creation

When creating an internal component, the following operations are performed:
  • A sub-directory named like the internal component is created in the project.
  • The different elements assigned to the internal component are grouped 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: case of total autonomy
An internal component can be linked to its own analysis. In this case, the project that hosts the internal component can have several analyses:

RAD and internal components with analysis

If several analyses are available in a project, when creating windows or pages by RAD, you will have the ability to select the data files linked to the project analysis or linked to the analysis of the internal components.

The elements generated by RAD for the internal component will be generated in the directory of the internal component. If the analysis of the internal component is modified, a new generation by RAD will automatically propose to generate the elements corresponding to the modifications.

Notes and limits:

  • The "Compatible 11" RAD pattern is not available for the internal components.
  • 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. GUI errors may occur. The operations must be performed manually.

Notes and limits
  • The internal components can be shared via the SCM only. See Share the internal components for more details.
  • A project element cannot be found in several internal components. A set of procedures cannot be shared among several internal components.
  • The internal components cannot be nested.
  • Managing the names of the elements: The names must be unique between the elements of the project and its internal components: you cannot use an internal component containing an element whose name is already found 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 the 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.
  • The reports found in an internal component must not be opened by "Reports & Queries".
  • A .NET assembly cannot be included in an internal component.
  • 15版本和更高版本
    If you want to organize the elements of an internal component, you can create custom-folders in the internal component. See Custom-folders for more details.
    15新版本
    If you want to organize the elements of an internal component, you can create custom-folders in the internal component. See Custom-folders for more details.
    If you want to organize the elements of an internal component, you can create custom-folders in the internal component. See Custom-folders for more details.

Installing an application that uses internal components
The internal components have no effect on the operations used to deploy an application or a site. All the elements found in the project (whether they are internal components or not) are taken into account when creating the executable and when creating the setup program.