Adding/Removing pzl-Component to the Pzl-Container: различия между версиями

Материал из wikiru.visual-prolog.com

м (Новая: {{copyright}} Операции над Pzl-Компонентами в Pzl-Контейнерах - добавление, удаление и изменение статуса не ре...)
 
 
(не показано 7 промежуточных версий этого же участника)
Строка 1: Строка 1:
{{copyright}}
{{copyright}}


Операции над Pzl-Компонентами в Pzl-Контейнерах - добавление, удаление и изменение статуса не рекомендуется делать в IDE системы Visual Prolog. Выполнение таких операций вручную с использованием IDE может привести к рассогласованию необходимых связей.
It is recommended to make the adding the plz-component to the pzl-Container using the Elementary PzlStudio. The manual performing this operation using the IDE may lead to the non-correspondence of some necessary links in the projects.


Однако компиляция проектов, содержащих Pzl-Компоненты, должна производится в IDE, при этом следует выполнять рекомендации, приведенные ниже.
You may also make a conversion of the status of the pzl-components, which was included to the  pzl-container before. The status "original" may be converted to the status "proxy". The back operation is available also.


=Вызов операции=
After the operation performing is complete you may come back to the Visual Prolog IDE and work with the modified project.
Операции над Pzl-Компонентой в Pzl-Контейнере (добавление, удаление и изменение статуса производятся с помощью одной и той же формы, вызываемой через меню '''Tools/Add/Component To Container'''. Проект контейнера должен быть сохранен средствами IDE (Ctrl-S). Закрывать проект не обязательно.  


[[Изображение:PzlStudio AddComponentDialog.png]]
=Invoking the Operation=
All operations with the pzl-component in the pzl-container such as adding, removing and changing the status must be done using the same form. You may invoke the form via menu item '''Tools/Add/Component To Container'''. The project of the pzl-container must be saved in IDE (Ctrl-S) before performing the operation. It is not necessary to close the project in the IDE if it is opened.  


Для подготовки к выполнению операции в форме должны быть выбраны Pzl-Контейнер ('''Container Project'''), которому соответствует файл проекта .prj6 и Pzl-Компонента ('''Component Package'''), которой соответствует Файл пакета компоненты .pack.
[[Image:PzlStudio AddComponentDialog.png]]


Pzl-контейнером может быть как главное приложение, так и DLL-контейнер. Если контейнером является главное исполняемое приложение, то в него предварительно  должен быть добавлен PzlPort. Если это DLL - то это должен быть именно Pzl-контейнер на основе DLL, созданный с помощью интрумента [[Создание Pzl-Контейнера|Elemntary PzlStudio]].
To prepare to the performing the operation you must set the Pzl-container ('''Container Project''') project (a file of the .prj6 type) and the pzl-component ('''Component Package''') package (a file of the .pack type).


Дальнейшие действия определяются тем, какая операция должна быть выполнена.
Any entity may be a pzl-container - an executable application or it may be a dll-container. To make the adding operation you choose the Visual Prolog project, which is a pzl-container. If it is the main application, then the pzlPort must be added to it before. If it is the DLL, then it must be actually the pzl-container based on DLL and created using the [[Creation of the Pzl-Container|Elementary PzlStudio]].


=Выполнение операции=
The further actions depend on the goal of the operation.
Выполнение операции осуществляется по нажатию одной из кнопок на панели:
*'''Add As Original''' - добавить в качестве оригинала
*'''Add As Proxy''' - Добавить в качестве представителя (Proxy)
*'''Remove''' - удалить
*'''Convert To Proxy''' - преобразовать в представителя (Proxy)


После выполнения операции в Oкне Cообщений (Messages) появляется отчет о выполнении операции.
=Performing the Operation=
The performing the operation is doing by the pressing one of buttons on the pane:
*'''Add As Original'''
*'''Add As Proxy'''
*'''Remove'''
*'''Convert To Proxy'''


После выполнения операции следует перейти к IDE системы Visual Prolog, открыть проект (если он не открыт) и откомпилировать. Детали выполнения операций и рекоментации приведены ниже.
The report regarding the result of the operation will be shown in the Message Window.


==Добавление==
After the completion of the operation you should go to the IDE of the Visual Prolog system, open project (if it is not opened) and build it. Some details of the performing the operation are described below.
Не имеет значения, является ли pzl-Контейнер пустым или в нем уже содержатся другие Pzl-Компоненты. Главное - добавляемая компонента до этого не должна содержаться в данном контейнере.


pzl-Компонента добавляется либо как оригинальная компонента, либо как представитель pzl-Компоненты (proxy).  
==Adding==
It dowsn’t matter whether the pzl-container is empty, or it has the pzl-components already. The main condition is that the component to be embedded must not be in the pzl-container already.


Если компонента добавляется как оригинальная компонента, то все другие классы могут ее использовать, создавая ее экземпляры и выполняя все, предусмотренные ее интерфейсами, действия. Для этого нажимается кнопка '''Add As Original''' (Добавить как оригинальную).
The pzl-component may be added as an original component or it may be added as a component delegate (proxy).


Если Вы добавляете в данный контейнер представителя Pzl-Компоненты, то это означает, что эта pzl-Компонента находится в каком-либо контейнере (Вы можете не знать, где именно), а все классы данного контейнера взаимодействуют с ней через ее представителя, находящегося в данном контейнере. В этом случае нажимается кнопка '''Add As Proxy''' (Добавить как представителя).
If you add the component as an original component, then all other classes may use it creating objects and performing all actions defined by the component’s interfaces. To add the pzl-component as the original one press the button '''Add As Original'''.


Сообщение в Окне сообщений  подтвердит выполнение операции.
If you add the component delegate, then all classes of the given container communicate in the creation of the component object using the component delegate. To add the pzl-component as the component delegate press the button '''Add As Proxy'''.


[[Изображение:PzlStudio ComponentAddedAsOriginalMSG.png]]
The Message Window will show the report regarding the result of the operation.


Откройте проект с помощью IDE (если он не открыт) и откомпилируйте его.
[[Image:PzlStudio ComponentAddedAsOriginalMSG.png]]


В процессе компиляции возможны следующие ситуации:
Open the project (if it is not opened) using the IDE and compile (build) it.
#При добавлении в качестве оригинала:
##'''Если добавленный Pzl-компонент  не использует другие Pzl-компоненты''',<br/>то все предолжения IDE по включению в проект других пакетов, используемых Pzl-Компонентом, '''можно принимать''' без опасений.
##'''Если добавленный Pzl-компонент использует другие Pzl-компоненты, не включенные'''<br/> к моменту компиляции в проект Pzl-Контейнера, то '''необходимо отказаться''' от предложения IDE по включению такой компоненты в данный проект.<br/>'''Включение таких дополнительных Pzl-Компонент следует произвести только с помощью Elementary PzlStudio'''.
#При добавлении в качестве представителя проблем не должно быть. Этот случай подпадает под действие правила 1.1, приведенного выше.


==Удаление==
While the performing the operation the following situations may happen:
Удаление pzl-Компоненты из Pzl-Контейнера рекомендуется осуществлять с помощью Elementary PzlStudio. Выполнение такой операции вручную с использованием IDE может привести к рассогласованию необходимых связей.
#If the original component added:
##'''If the new pzl-component added to the pzl-container doesn’t use other pzl-components''',<br/>then you should accept all proposals from the IDE to add new packages to the project.
##'''If the new pzl-component added to the pzl-container uses some other pzl-components, which are not currently included to the pzl-container project, then you should refuse the adding such a new pzl-component to the project by the IDE.<br/>'''The inclusion of these pzl-components must be done using the Elementary PzlStudio only'''.
#If you add the pzl-component delegate (proxy) there should not be any problems, because of it is the particular case of the rule 1.1 described above.


После выполнения операции в Окне Сообщений появляется отчет о выполнении операции
==Removing==
It is recommended to perform the removing the pzl-component from the pzl-container using the Elementary PzlStudio. The manual performing this operation using the IDE may lead to braking some links in the project.


[[Изображение:PzlStudio_ComponentRemovedSuccessfulyMSG.png‎]]
After the completion of the operation you will see the report regarding the results of the operation in the Message Window.


Теперь следует вернуться к IDE, если проект контейнера был ранее открыт, или в IDE открыть модифицированный проект.
[[Image:PzlStudio_ComponentRemovedSuccessfulyMSG.png‎]]


После удаления pzl-Компоненты следует произвести полную перекомпиляцию проекта с использованием '''Rebuild All'''.
Now you must come back to the IDE and open the pzl-container project (if it was not opened before).


Удаление pzl-Компоненты может привести к нарушению целостности проекта Pzl-Контейнера. Это справедливо, если какие-либо пакеты содержат обращения к удаленной Pzl-компоненте. Строго говоря, удаление Pzl-Компоненты в таких случаях является некорректной операцией. Правильнее было бы изменить статус pzl-Компоненты, преобразовав ее в представителя (Proxy).
It is recommended to make “Rebuild All” after the removing a pzl-component from the pzl-container.


Преобразование не требуется, если одновременно с удалением данной Pzl-компоненты из данного Pzl-контейнера синхронно удаляютя и пакеты, обращающиеся к ней.
The removing of the pzl-component may break some links in the project. It may happen if there are some invocations of the removed component from other classes of the given pzl-container. Strongly say you should not remove the pzl-component from the pzl-project. You should convert the status of the pzl-component to the Proxy status.


Если взаимного обращения обычных или являющихся компонентами пакетов, помещенных в данный контейнер, нет, то побочных явлений не должно возникать.
The conversion of the status will not be needed of you are making the synchronous removing of the pzl-components together will all classes (packages), which use it.


==Изменение Статуса pzl-Компоненты==
If there is no use of the removed component by the classes and packages of the given pzl-container project, then there should be no problems.
Pzl-Компонента может иметь статус '''Ориганал''' или '''Представитель''' (Proxy).


При добавлении Pzl-Компоненты в Pzl-Контейнер статус компоненты определяется типом операции: добавление в качестве  Оригинала или в качестве Представителя.
==Changing the Status of the Pzl-Component ==
The pzl-component may have the status “Original” or it may be “Proxy”.


Пользуясь Elementary PzlStudio, Вы можете изменить статус pzl-Компоненты с оригинального на Proxy и обратно.
While adding the pzl-component to the pzl-project the status of the pzl-component is defined by the type of the operation performed (‘’’Add As Original’’’ or ‘’’Add As Proxy’’’).
===Конвертация в Proxy===
Изменение статуса с оригинального на Proxy производится простым нажатием на кнопку '''Convert To Proxy''' (Преобразовать в Proxy). В Окне сообщений появится отчет о выполнении операции.


[[Изображение:PzlStudio_ConvertOriginalToProxyMSG.png]]
Using the Elementary PzlStudio, you may change the status of the pzl-component from the “original” to “proxy” and back.
===Converting to Proxy ===
Converting the status from the “original” to “proxy” may be done by pressing the button '''Convert To Proxy'''. You will see the report regarding the performing the operation.


Теперь надо перейти к IDE и откомпилировать проект.
[[Image:PzlStudio_ConvertOriginalToProxyMSG.png]]


===Конвертация в Оригинал===
Now you should go to the IDE and compile the project.
Форма не имеет явной операции по преобразованию ствтуса Pzl-Компоненты с Proxy на Оригинал. Однако выполнение операции '''Add As Original''', несмотря на присутствие Pzl-компоненты в Pzl-контейнере, установит статус Pzl-Компоненты Оригинал. Отчет в Окне Сообщений покажет:


[[Изображение:PzlStudio_ConvertProxyToOriginalMSG.png]]
===Converting to the Original ===
There is no special operation to convert the status of the pzl-component from the ‘proxy’ to the ‘original’. Performing the operation '''Add As Original''', despite on the existence of the pzl-component in the project will change the status of the pzl-component to the “original” status. There will be the report in the Message Window:


Теперь надо перейти к IDE и откомпилировать проект.
[[Image:PzlStudio_ConvertProxyToOriginalMSG.png]]
 
Now you should go to the IDE and build the project.


=References=
=References=
[[Category:VpPuZzleEn]]
[[Category:VpPuZzleEn]]

Текущая версия на 11:52, 6 февраля 2008

Автор: Виктор Юхтенко

It is recommended to make the adding the plz-component to the pzl-Container using the Elementary PzlStudio. The manual performing this operation using the IDE may lead to the non-correspondence of some necessary links in the projects.

You may also make a conversion of the status of the pzl-components, which was included to the pzl-container before. The status "original" may be converted to the status "proxy". The back operation is available also.

After the operation performing is complete you may come back to the Visual Prolog IDE and work with the modified project.

Invoking the Operation

All operations with the pzl-component in the pzl-container such as adding, removing and changing the status must be done using the same form. You may invoke the form via menu item Tools/Add/Component To Container. The project of the pzl-container must be saved in IDE (Ctrl-S) before performing the operation. It is not necessary to close the project in the IDE if it is opened.

PzlStudio AddComponentDialog.png

To prepare to the performing the operation you must set the Pzl-container (Container Project) project (a file of the .prj6 type) and the pzl-component (Component Package) package (a file of the .pack type).

Any entity may be a pzl-container - an executable application or it may be a dll-container. To make the adding operation you choose the Visual Prolog project, which is a pzl-container. If it is the main application, then the pzlPort must be added to it before. If it is the DLL, then it must be actually the pzl-container based on DLL and created using the Elementary PzlStudio.

The further actions depend on the goal of the operation.

Performing the Operation

The performing the operation is doing by the pressing one of buttons on the pane:

  • Add As Original
  • Add As Proxy
  • Remove
  • Convert To Proxy

The report regarding the result of the operation will be shown in the Message Window.

After the completion of the operation you should go to the IDE of the Visual Prolog system, open project (if it is not opened) and build it. Some details of the performing the operation are described below.

Adding

It dowsn’t matter whether the pzl-container is empty, or it has the pzl-components already. The main condition is that the component to be embedded must not be in the pzl-container already.

The pzl-component may be added as an original component or it may be added as a component delegate (proxy).

If you add the component as an original component, then all other classes may use it creating objects and performing all actions defined by the component’s interfaces. To add the pzl-component as the original one press the button Add As Original.

If you add the component delegate, then all classes of the given container communicate in the creation of the component object using the component delegate. To add the pzl-component as the component delegate press the button Add As Proxy.

The Message Window will show the report regarding the result of the operation.

PzlStudio ComponentAddedAsOriginalMSG.png

Open the project (if it is not opened) using the IDE and compile (build) it.

While the performing the operation the following situations may happen:

  1. If the original component added:
    1. If the new pzl-component added to the pzl-container doesn’t use other pzl-components,
      then you should accept all proposals from the IDE to add new packages to the project.
    2. If the new pzl-component added to the pzl-container uses some other pzl-components, which are not currently included to the pzl-container project, then you should refuse the adding such a new pzl-component to the project by the IDE.
      The inclusion of these pzl-components must be done using the Elementary PzlStudio only.
  2. If you add the pzl-component delegate (proxy) there should not be any problems, because of it is the particular case of the rule 1.1 described above.

Removing

It is recommended to perform the removing the pzl-component from the pzl-container using the Elementary PzlStudio. The manual performing this operation using the IDE may lead to braking some links in the project.

After the completion of the operation you will see the report regarding the results of the operation in the Message Window.

PzlStudio ComponentRemovedSuccessfulyMSG.png

Now you must come back to the IDE and open the pzl-container project (if it was not opened before).

It is recommended to make “Rebuild All” after the removing a pzl-component from the pzl-container.

The removing of the pzl-component may break some links in the project. It may happen if there are some invocations of the removed component from other classes of the given pzl-container. Strongly say you should not remove the pzl-component from the pzl-project. You should convert the status of the pzl-component to the Proxy status.

The conversion of the status will not be needed of you are making the synchronous removing of the pzl-components together will all classes (packages), which use it.

If there is no use of the removed component by the classes and packages of the given pzl-container project, then there should be no problems.

Changing the Status of the Pzl-Component

The pzl-component may have the status “Original” or it may be “Proxy”.

While adding the pzl-component to the pzl-project the status of the pzl-component is defined by the type of the operation performed (‘’’Add As Original’’’ or ‘’’Add As Proxy’’’).

Using the Elementary PzlStudio, you may change the status of the pzl-component from the “original” to “proxy” and back.

Converting to Proxy

Converting the status from the “original” to “proxy” may be done by pressing the button Convert To Proxy. You will see the report regarding the performing the operation.

PzlStudio ConvertOriginalToProxyMSG.png

Now you should go to the IDE and compile the project.

Converting to the Original

There is no special operation to convert the status of the pzl-component from the ‘proxy’ to the ‘original’. Performing the operation Add As Original, despite on the existence of the pzl-component in the project will change the status of the pzl-component to the “original” status. There will be the report in the Message Window:

PzlStudio ConvertProxyToOriginalMSG.png

Now you should go to the IDE and build the project.

References